From 795f24abc403065a67f5599b2a09a63f40b110fc Mon Sep 17 00:00:00 2001 From: ShchipkovMY Date: Sun, 19 Oct 2025 18:30:13 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'labworks/LW1/report.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- labworks/LW1/report.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/labworks/LW1/report.md b/labworks/LW1/report.md index e907fb9..eac6789 100644 --- a/labworks/LW1/report.md +++ b/labworks/LW1/report.md @@ -218,6 +218,11 @@ scores = model_1h500.evaluate(X_test, y_test) print('Loss on test data:', scores[0]) print('Accuracy on test data:', scores[1]) ``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture8.PNG) + +Loss on test data: 0.24226699769496918 +Accuracy on test data: 0.9291999936103821 + Наилучшую метрику наблюдаем при архитектуре со 100 нейронами в скрытом слое. @@ -257,6 +262,11 @@ print('Loss on test data:', scores[0]) print('Accuracy on test data:', scores[1]) ``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture9.PNG) + +Loss on test data: 0.19637857377529144 +Accuracy on test data: 0.9409000277519226 + При 100 нейронах ```python # создаем модель @@ -289,6 +299,11 @@ print('Loss on test data:', scores[0]) print('Accuracy on test data:', scores[1]) ``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture10.PNG) + +Loss on test data: 0.19593027234077454 +Accuracy on test data: 0.9416999816894531 + ### Пункт 10 Результаты исследования архитектуры нейронной сети занесли в таблицу ### Таблица с результатами тестирования нейросетевых моделей @@ -324,6 +339,11 @@ print('Real mark: ', str(np.argmax(y_test[n]))) print('NN answer: ', str(np.argmax(result))) ``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture11.PNG) + +Real mark: 0 +NN answer: 0 + ### Пункт 13 Создали собственные изображения чисел ```python @@ -337,7 +357,13 @@ test_img = np.array(file_data) # вывод собственного изображения plt.imshow(test_img, cmap=plt.get_cmap('gray')) plt.show() +``` + +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture12.PNG) + + +```python # предобработка test_img = test_img / 255 test_img = test_img.reshape(1, num_pixels) @@ -346,6 +372,9 @@ result = model_1h100_2h100.predict(test_img) print('I think it\'s ', np.argmax(result)) ``` +I think it's 5 + + ### Пункт 14 Создали копию нарисованных чисел и повернем их на 90 градусов. Протестируем работу нейронной сети. ```python @@ -363,7 +392,13 @@ test_img = test_img.reshape(1, num_pixels) # распознавание result = model_1h100_2h100.predict(test_img) print('I think it\'s ', np.argmax(result)) +``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture13.PNG) + +I think it's 2 + +```python file_data = Image.open('five_v3_rotated.png') file_data = file_data.convert('L') # перевод в градации серого test_img = np.array(file_data) @@ -379,5 +414,10 @@ result = model_1h100_2h100.predict(test_img) print('I think it\'s ', np.argmax(result)) ``` +![photo](http://uit.mpei.ru/git/ShchipkovMY/is_dnn/raw/branch/main/labworks/LW1/images%20/picture14.PNG) + +I think it's 2 + + Нейросеть некорректно определила повернутые изображения. \ No newline at end of file