1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), Dense(128, activation='relu'), Dropout(0.2), Dense(64, activation='relu'), Dense(32, activation='relu'), Dense(2, activation='softmax') ]) D:\pyAnaconda\envs\pythonProject\python.exe D:/Code/pythonProject/work/sdss_reco.py Epoch 1/20 1038/1038 [==============================] - 9s 8ms/step - loss: 0.2111 - sparse_categorical_accuracy: 0.9320 - val_loss: 0.1328 - val_sparse_categorical_accuracy: 0.9599 Epoch 2/20 1038/1038 [==============================] - 8s 8ms/step - loss: 0.1339 - sparse_categorical_accuracy: 0.9560 - val_loss: 0.1196 - val_sparse_categorical_accuracy: 0.9626 Epoch 3/20 1038/1038 [==============================] - 8s 8ms/step - loss: 0.1209 - sparse_categorical_accuracy: 0.9606 - val_loss: 0.1059 - val_sparse_categorical_accuracy: 0.9658 Epoch 4/20 1038/1038 [==============================] - 8s 8ms/step - loss: 0.1100 - sparse_categorical_accuracy: 0.9645 - val_loss: 0.1252 - val_sparse_categorical_accuracy: 0.9599 Epoch 5/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.1062 - sparse_categorical_accuracy: 0.9652 - val_loss: 0.0966 - val_sparse_categorical_accuracy: 0.9686 Epoch 6/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.1027 - sparse_categorical_accuracy: 0.9663 - val_loss: 0.1018 - val_sparse_categorical_accuracy: 0.9661 Epoch 7/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.0965 - sparse_categorical_accuracy: 0.9683 - val_loss: 0.0893 - val_sparse_categorical_accuracy: 0.9696 Epoch 8/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.0938 - sparse_categorical_accuracy: 0.9699 - val_loss: 0.0873 - val_sparse_categorical_accuracy: 0.9696 Epoch 9/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.0873 - sparse_categorical_accuracy: 0.9716 - val_loss: 0.0977 - val_sparse_categorical_accuracy: 0.9658 Epoch 10/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0869 - sparse_categorical_accuracy: 0.9717 - val_loss: 0.0934 - val_sparse_categorical_accuracy: 0.9680 Epoch 11/20 1038/1038 [==============================] - 8s 7ms/step - loss: 0.0816 - sparse_categorical_accuracy: 0.9737 - val_loss: 0.0905 - val_sparse_categorical_accuracy: 0.9705 Epoch 12/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0797 - sparse_categorical_accuracy: 0.9745 - val_loss: 0.0858 - val_sparse_categorical_accuracy: 0.9729 Epoch 13/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0783 - sparse_categorical_accuracy: 0.9742 - val_loss: 0.0815 - val_sparse_categorical_accuracy: 0.9729 Epoch 14/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0766 - sparse_categorical_accuracy: 0.9748 - val_loss: 0.0921 - val_sparse_categorical_accuracy: 0.9710 Epoch 15/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0731 - sparse_categorical_accuracy: 0.9763 - val_loss: 0.0839 - val_sparse_categorical_accuracy: 0.9729 Epoch 16/20 1038/1038 [==============================] - 6s 6ms/step - loss: 0.0732 - sparse_categorical_accuracy: 0.9761 - val_loss: 0.0871 - val_sparse_categorical_accuracy: 0.9713 Epoch 17/20 1038/1038 [==============================] - 7s 6ms/step - loss: 0.0697 - sparse_categorical_accuracy: 0.9775 - val_loss: 0.0992 - val_sparse_categorical_accuracy: 0.9694 Epoch 18/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.0721 - sparse_categorical_accuracy: 0.9771 - val_loss: 0.0869 - val_sparse_categorical_accuracy: 0.9729 Epoch 19/20 1038/1038 [==============================] - 8s 8ms/step - loss: 0.0690 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0870 - val_sparse_categorical_accuracy: 0.9748 Epoch 20/20 1038/1038 [==============================] - 7s 7ms/step - loss: 0.0674 - sparse_categorical_accuracy: 0.9780 - val_loss: 0.0876 - val_sparse_categorical_accuracy: 0.9729 Model: "sequential" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= flatten (Flatten) (None, 12288) 0 _________________________________________________________________ dense (Dense) (None, 128) 1572992 _________________________________________________________________ dropout (Dropout) (None, 128) 0 _________________________________________________________________ dense_1 (Dense) (None, 64) 8256 _________________________________________________________________ dense_2 (Dense) (None, 32) 2080 _________________________________________________________________ dense_3 (Dense) (None, 2) 66 ================================================================= Total params: 1,583,394 Trainable params: 1,583,394 Non-trainable params: 0 _________________________________________________________________
|