diff --git a/labworks/LW1/1.2.png b/labworks/LW1/1.2.png new file mode 100644 index 0000000..2eb6e88 Binary files /dev/null and b/labworks/LW1/1.2.png differ diff --git a/labworks/LW1/1.png b/labworks/LW1/1.png new file mode 100644 index 0000000..107cfc5 Binary files /dev/null and b/labworks/LW1/1.png differ diff --git a/labworks/LW1/12.1.png b/labworks/LW1/12.1.png new file mode 100644 index 0000000..2093126 Binary files /dev/null and b/labworks/LW1/12.1.png differ diff --git a/labworks/LW1/12.2.png b/labworks/LW1/12.2.png new file mode 100644 index 0000000..039b722 Binary files /dev/null and b/labworks/LW1/12.2.png differ diff --git a/labworks/LW1/4.1.png b/labworks/LW1/4.1.png new file mode 100644 index 0000000..9314cdb Binary files /dev/null and b/labworks/LW1/4.1.png differ diff --git a/labworks/LW1/4.2.png b/labworks/LW1/4.2.png new file mode 100644 index 0000000..4f60966 Binary files /dev/null and b/labworks/LW1/4.2.png differ diff --git a/labworks/LW1/4.222.png b/labworks/LW1/4.222.png new file mode 100644 index 0000000..f9af212 Binary files /dev/null and b/labworks/LW1/4.222.png differ diff --git a/labworks/LW1/4.3.png b/labworks/LW1/4.3.png new file mode 100644 index 0000000..4ccff3d Binary files /dev/null and b/labworks/LW1/4.3.png differ diff --git a/labworks/LW1/4.4.png b/labworks/LW1/4.4.png new file mode 100644 index 0000000..f15b477 Binary files /dev/null and b/labworks/LW1/4.4.png differ diff --git a/labworks/LW1/4.png b/labworks/LW1/4.png new file mode 100644 index 0000000..681a309 Binary files /dev/null and b/labworks/LW1/4.png differ diff --git a/labworks/LW1/6.png b/labworks/LW1/6.png new file mode 100644 index 0000000..cb05228 Binary files /dev/null and b/labworks/LW1/6.png differ diff --git a/labworks/LW1/8.100.png b/labworks/LW1/8.100.png new file mode 100644 index 0000000..ff2a20d Binary files /dev/null and b/labworks/LW1/8.100.png differ diff --git a/labworks/LW1/8.300.png b/labworks/LW1/8.300.png new file mode 100644 index 0000000..4b28cff Binary files /dev/null and b/labworks/LW1/8.300.png differ diff --git a/labworks/LW1/8.500.png b/labworks/LW1/8.500.png new file mode 100644 index 0000000..39ce680 Binary files /dev/null and b/labworks/LW1/8.500.png differ diff --git a/labworks/LW1/9.300.100.png b/labworks/LW1/9.300.100.png new file mode 100644 index 0000000..2a8ca1a Binary files /dev/null and b/labworks/LW1/9.300.100.png differ diff --git a/labworks/LW1/9.300.50.png b/labworks/LW1/9.300.50.png new file mode 100644 index 0000000..3a9f5cf Binary files /dev/null and b/labworks/LW1/9.300.50.png differ diff --git a/labworks/LW1/notebook.ipynb b/labworks/LW1/notebook.ipynb new file mode 100644 index 0000000..b63c039 --- /dev/null +++ b/labworks/LW1/notebook.ipynb @@ -0,0 +1 @@ +{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyPC/SZVlsvuucft1t0l8Bhx"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":1,"metadata":{"id":"lXNlZGHIqxlV","executionInfo":{"status":"error","timestamp":1758531901705,"user_tz":-180,"elapsed":50,"user":{"displayName":"Данила Новиков","userId":"16029008369036023959"}},"outputId":"a6271035-c2c2-40e1-e2cd-c4cee8035df6","colab":{"base_uri":"https://localhost:8080/","height":211}},"outputs":[{"output_type":"error","ename":"FileNotFoundError","evalue":"[Errno 2] No such file or directory: '/content/drive/MyDrive/Colab Notebooks'","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)","\u001b[0;32m/tmp/ipython-input-1074595868.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m#пункт 1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'/content/drive/MyDrive/Colab Notebooks'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;31m# импорт модулей\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/content/drive/MyDrive/Colab Notebooks'"]}],"source":["#пункт 1\n","import os\n","os.chdir('/content/drive/MyDrive/Colab Notebooks')\n","# импорт модулей\n","from tensorflow import keras\n","import matplotlib.pyplot as plt\n","import numpy as np\n","import sklearn\n","\n","#пункт 2\n","# загрузка датасета\n","from keras.datasets import mnist\n","(X_train, y_train), (X_test, y_test) = mnist.load_data()\n","\n","#пункт 3\n","# создание своего разбиения датасета\n","from sklearn.model_selection import train_test_split\n","# объединяем в один набор\n","X = np.concatenate((X_train, X_test))\n","y = np.concatenate((y_train, y_test))\n","# разбиваем по вариантам\n","X_train, X_test, y_train, y_test = train_test_split(X, y,\n"," test_size = 10000,\n"," train_size = 60000,\n"," random_state = 123)\n","# вывод размерностей\n","print('Shape of X train:', X_train.shape)\n","print('Shape of y train:', y_train.shape)\n","\n","#пункт 4\n","# вывод изображения 1\n","plt.imshow(X_train[0], cmap=plt.get_cmap('gray'))\n","plt.show()\n","# вывод метки для этого изображения\n","print(y_train[0])\n","# вывод изображения 2\n","plt.imshow(X_train[1], cmap=plt.get_cmap('gray'))\n","plt.show()\n","# вывод метки для этого изображения\n","print(y_train[1])\n","# вывод изображения 3\n","plt.imshow(X_train[2], cmap=plt.get_cmap('gray'))\n","plt.show()\n","# вывод метки для этого изображения\n","print(y_train[2])\n","# вывод изображения 4\n","plt.imshow(X_train[3], cmap=plt.get_cmap('gray'))\n","plt.show()\n","# вывод метки для этого изображения\n","print(y_train[3])\n","\n","\n","#пункт 5\n","# развернем каждое изображение 28*28 в вектор 784\n","num_pixels = X_train.shape[1] * X_train.shape[2]\n","X_train = X_train.reshape(X_train.shape[0], num_pixels) / 255\n","X_test = X_test.reshape(X_test.shape[0], num_pixels) / 255\n","print('Shape of transformed X train:', X_train.shape)\n","\n","# переведем метки в one-hot\n","\n","from keras.utils import np_utils\n","y_train = np_utils.to_categorical(y_train)\n","y_test = np_utils.to_categorical(y_test)\n","print('Shape of transformed y train:', y_train.shape)\n","num_classes = y_train.shape[1]\n","\n","print('Shape of transformed X test:', X_test.shape)\n","print('Shape of transformed Y test:', y_test.shape)\n"]}]} \ No newline at end of file diff --git a/labworks/LW1/report1.md b/labworks/LW1/report1.md new file mode 100644 index 0000000..d8c2ba7 Binary files /dev/null and b/labworks/LW1/report1.md differ