|
親愛的作者您好, 最近閱讀您的大作: Python機器學習與深度學習特訓班, 有一個問題請教:
TensorFlow GPU keras installed
行 ch02 Keras_Mnist_MLP 程式時
runfile('H:/本書範例/ch02/Keras_Mnist_MLP.py', wdir='H:/本書範例/ch02') Epoch 1/10 240/240 - 1s - loss: 0.4327 - accuracy: 0.8837 - val_loss: 0.2150 - val_accuracy: 0.9405 Epoch 2/10 240/240 - 1s - loss: 0.1877 - accuracy: 0.9471 - val_loss: 0.1546 - val_accuracy: 0.9569 Epoch 3/10 240/240 - 1s - loss: 0.1327 - accuracy: 0.9618 - val_loss: 0.1283 - val_accuracy: 0.9626 Epoch 4/10 240/240 - 1s - loss: 0.1022 - accuracy: 0.9715 - val_loss: 0.1118 - val_accuracy: 0.9682 Epoch 5/10 240/240 - 1s - loss: 0.0810 - accuracy: 0.9775 - val_loss: 0.0953 - val_accuracy: 0.9727 Epoch 6/10 240/240 - 1s - loss: 0.0658 - accuracy: 0.9821 - val_loss: 0.0924 - val_accuracy: 0.9724 Epoch 7/10 240/240 - 1s - loss: 0.0542 - accuracy: 0.9850 - val_loss: 0.0899 - val_accuracy: 0.9732 Epoch 8/10 240/240 - 1s - loss: 0.0454 - accuracy: 0.9875 - val_loss: 0.0854 - val_accuracy: 0.9747 Epoch 9/10 240/240 - 1s - loss: 0.0387 - accuracy: 0.9899 - val_loss: 0.0835 - val_accuracy: 0.9755 Epoch 10/10 240/240 - 1s - loss: 0.0331 - accuracy: 0.9916 - val_loss: 0.0852 - val_accuracy: 0.9747 313/313 [==============================] - 0s 781us/step - loss: 0.0774 - accuracy: 0.9761
準確率= 0.9761000275611877 WARNING:tensorflow:From H:\本書範例\ch02\Keras_Mnist_MLP.py:84: Sequential.predict_classes (from tensorflow.python.keras.engine.sequential) is deprecated and will be removed after 2021-01-01. Instructions for updating: Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
Figures now render in the Plots pane by default. To make them also appear inline in the Console, uncheck "Mute Inline Plotting" under the Plots pane options menu.
<<<請問 240/240 在下句的意思 為何是 240, 而不是768之類 ? 不知那些warnings 是甚麽 ?>>>
Epoch 1/10 240/240 - 1s - loss: 0.4327 - accuracy: 0.8837 - val_loss: 0.2150 - val_accuracy: 0.9405
<<<又如 save to document 而execute, 不知那些warnings 是甚麽 ?:>>>
runfile('C:/Users/George/Documents/Keras_Mnist_MLP.py', wdir='C:/Users/George/Documents') Reloaded modules: tmpqaml15om, tmpubp7y5k4, tmplriedydn Epoch 1/10 WARNING:tensorflow:AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x00000296B255E950> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert WARNING: AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x00000296B255E950> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert WARNING:tensorflow:AutoGraph could not transform <function Model.make_test_function.<locals>.test_function at 0x00000296DB8FBA60> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert WARNING: AutoGraph could not transform <function Model.make_test_function.<locals>.test_function at 0x00000296DB8FBA60> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert 240/240 - 1s - loss: 0.4423 - accuracy: 0.8821 - val_loss: 0.2279 - val_accuracy: 0.9357 Epoch 2/10 240/240 - 1s - loss: 0.1911 - accuracy: 0.9451 - val_loss: 0.1587 - val_accuracy: 0.9548 Epoch 3/10 240/240 - 1s - loss: 0.1357 - accuracy: 0.9614 - val_loss: 0.1281 - val_accuracy: 0.9632 Epoch 4/10 240/240 - 1s - loss: 0.1041 - accuracy: 0.9705 - val_loss: 0.1091 - val_accuracy: 0.9674 Epoch 5/10 240/240 - 1s - loss: 0.0840 - accuracy: 0.9771 - val_loss: 0.1048 - val_accuracy: 0.9708 Epoch 6/10 240/240 - 1s - loss: 0.0681 - accuracy: 0.9805 - val_loss: 0.0926 - val_accuracy: 0.9738 Epoch 7/10 240/240 - 1s - loss: 0.0548 - accuracy: 0.9853 - val_loss: 0.0876 - val_accuracy: 0.9730 Epoch 8/10 240/240 - 1s - loss: 0.0449 - accuracy: 0.9878 - val_loss: 0.0821 - val_accuracy: 0.9748 Epoch 9/10 240/240 - 1s - loss: 0.0379 - accuracy: 0.9901 - val_loss: 0.0813 - val_accuracy: 0.9756 Epoch 10/10 240/240 - 1s - loss: 0.0317 - accuracy: 0.9918 - val_loss: 0.0802 - val_accuracy: 0.9768 313/313 [==============================] - 0s 774us/step - loss: 0.0757 - accuracy: 0.9767
準確率= 0.9767000079154968 WARNING:tensorflow:AutoGraph could not transform <function Model.make_predict_function.<locals>.predict_function at 0x00000296DCA0B8C8> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert WARNING: AutoGraph could not transform <function Model.make_predict_function.<locals>.predict_function at 0x00000296DCA0B8C8> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert |