TensorFlow版的“Hello World”,运行官网第一个例子
生活随笔
收集整理的這篇文章主要介紹了
TensorFlow版的“Hello World”,运行官网第一个例子
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
TensorFlow版的“Hello World”,運行官網第一個例子。代碼如下:
#!/usr/bin/env python import os import tensorflow as tf os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'mnist = tf.keras.datasets.mnist(x_train, y_train), (x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0model = tf.keras.models.Sequential([tf.keras.layers.Flatten(input_shape=(28, 28)),tf.keras.layers.Dense(128, activation='relu'),tf.keras.layers.Dropout(0.2),tf.keras.layers.Dense(10, activation='softmax') ])model.compile(optimizer='adam',loss='sparse_categorical_crossentropy',metrics=['accuracy'])model.fit(x_train, y_train, epochs=5) model.evaluate(x_test, y_test)運行結果如下:
"C:\Program Files\Python\Python37\python.exe" "D:/Pycharm Projects/MLDemo/MLDemo.py" Epoch 1/532/60000 [..............................] - ETA: 10:56 - loss: 2.3984 - acc: 0.15621152/60000 [..............................] - ETA: 20s - loss: 1.6221 - acc: 0.5486 2240/60000 [>.............................] - ETA: 11s - loss: 1.2468 - acc: 0.64913392/60000 [>.............................] - ETA: 8s - loss: 1.0108 - acc: 0.7123 4512/60000 [=>............................] - ETA: 6s - loss: 0.8789 - acc: 0.74805600/60000 [=>............................] - ETA: 5s - loss: 0.8033 - acc: 0.76966720/60000 [==>...........................] - ETA: 5s - loss: 0.7343 - acc: 0.79057808/60000 [==>...........................] - ETA: 4s - loss: 0.6867 - acc: 0.80398928/60000 [===>..........................] - ETA: 4s - loss: 0.6453 - acc: 0.8160 10048/60000 [====>.........................] - ETA: 4s - loss: 0.6159 - acc: 0.8241 11104/60000 [====>.........................] - ETA: 3s - loss: 0.5883 - acc: 0.8321 12256/60000 [=====>........................] - ETA: 3s - loss: 0.5649 - acc: 0.8393 13376/60000 [=====>........................] - ETA: 3s - loss: 0.5426 - acc: 0.8450 14464/60000 [======>.......................] - ETA: 3s - loss: 0.5238 - acc: 0.8504 15456/60000 [======>.......................] - ETA: 3s - loss: 0.5107 - acc: 0.8544 16608/60000 [=======>......................] - ETA: 2s - loss: 0.5007 - acc: 0.8572 17664/60000 [=======>......................] - ETA: 2s - loss: 0.4876 - acc: 0.8607 18784/60000 [========>.....................] - ETA: 2s - loss: 0.4746 - acc: 0.8645 19808/60000 [========>.....................] - ETA: 2s - loss: 0.4631 - acc: 0.8674 20864/60000 [=========>....................] - ETA: 2s - loss: 0.4526 - acc: 0.8704 21984/60000 [=========>....................] - ETA: 2s - loss: 0.4434 - acc: 0.8727 23104/60000 [==========>...................] - ETA: 2s - loss: 0.4336 - acc: 0.8757 24224/60000 [===========>..................] - ETA: 2s - loss: 0.4258 - acc: 0.8781 25280/60000 [===========>..................] - ETA: 2s - loss: 0.4178 - acc: 0.8804 26368/60000 [============>.................] - ETA: 2s - loss: 0.4114 - acc: 0.8819 27488/60000 [============>.................] - ETA: 1s - loss: 0.4025 - acc: 0.8844 28608/60000 [=============>................] - ETA: 1s - loss: 0.3949 - acc: 0.8866 29760/60000 [=============>................] - ETA: 1s - loss: 0.3876 - acc: 0.8886 30752/60000 [==============>...............] - ETA: 1s - loss: 0.3838 - acc: 0.8892 31840/60000 [==============>...............] - ETA: 1s - loss: 0.3800 - acc: 0.8902 32960/60000 [===============>..............] - ETA: 1s - loss: 0.3752 - acc: 0.8916 34112/60000 [================>.............] - ETA: 1s - loss: 0.3696 - acc: 0.8934 35264/60000 [================>.............] - ETA: 1s - loss: 0.3651 - acc: 0.8947 36352/60000 [=================>............] - ETA: 1s - loss: 0.3608 - acc: 0.8959 37472/60000 [=================>............] - ETA: 1s - loss: 0.3556 - acc: 0.8974 38624/60000 [==================>...........] - ETA: 1s - loss: 0.3519 - acc: 0.8987 39776/60000 [==================>...........] - ETA: 1s - loss: 0.3479 - acc: 0.8997 40864/60000 [===================>..........] - ETA: 1s - loss: 0.3450 - acc: 0.9004 41952/60000 [===================>..........] - ETA: 0s - loss: 0.3406 - acc: 0.9016 43104/60000 [====================>.........] - ETA: 0s - loss: 0.3373 - acc: 0.9026 44256/60000 [=====================>........] - ETA: 0s - loss: 0.3343 - acc: 0.9036 45088/60000 [=====================>........] - ETA: 0s - loss: 0.3317 - acc: 0.9045 46016/60000 [======================>.......] - ETA: 0s - loss: 0.3292 - acc: 0.9051 47104/60000 [======================>.......] - ETA: 0s - loss: 0.3261 - acc: 0.9061 48256/60000 [=======================>......] - ETA: 0s - loss: 0.3232 - acc: 0.9069 49280/60000 [=======================>......] - ETA: 0s - loss: 0.3198 - acc: 0.9079 50336/60000 [========================>.....] - ETA: 0s - loss: 0.3170 - acc: 0.9087 51456/60000 [========================>.....] - ETA: 0s - loss: 0.3145 - acc: 0.9092 52576/60000 [=========================>....] - ETA: 0s - loss: 0.3121 - acc: 0.9100 53664/60000 [=========================>....] - ETA: 0s - loss: 0.3094 - acc: 0.9106 54752/60000 [==========================>...] - ETA: 0s - loss: 0.3075 - acc: 0.9110 55904/60000 [==========================>...] - ETA: 0s - loss: 0.3054 - acc: 0.9117 57056/60000 [===========================>..] - ETA: 0s - loss: 0.3039 - acc: 0.9121 58144/60000 [============================>.] - ETA: 0s - loss: 0.3016 - acc: 0.9128 59264/60000 [============================>.] - ETA: 0s - loss: 0.2998 - acc: 0.9132 60000/60000 [==============================] - 3s 52us/step - loss: 0.2980 - acc: 0.9138 Epoch 2/532/60000 [..............................] - ETA: 7s - loss: 0.0515 - acc: 1.00001152/60000 [..............................] - ETA: 2s - loss: 0.1774 - acc: 0.95492176/60000 [>.............................] - ETA: 2s - loss: 0.1576 - acc: 0.95823200/60000 [>.............................] - ETA: 2s - loss: 0.1582 - acc: 0.95414320/60000 [=>............................] - ETA: 2s - loss: 0.1627 - acc: 0.95255472/60000 [=>............................] - ETA: 2s - loss: 0.1641 - acc: 0.95416560/60000 [==>...........................] - ETA: 2s - loss: 0.1660 - acc: 0.95307680/60000 [==>...........................] - ETA: 2s - loss: 0.1618 - acc: 0.95438800/60000 [===>..........................] - ETA: 2s - loss: 0.1622 - acc: 0.95479952/60000 [===>..........................] - ETA: 2s - loss: 0.1611 - acc: 0.9542 11072/60000 [====>.........................] - ETA: 2s - loss: 0.1575 - acc: 0.9556 12000/60000 [=====>........................] - ETA: 2s - loss: 0.1580 - acc: 0.9556 13088/60000 [=====>........................] - ETA: 2s - loss: 0.1567 - acc: 0.9558 14240/60000 [======>.......................] - ETA: 2s - loss: 0.1548 - acc: 0.9558 15360/60000 [======>.......................] - ETA: 2s - loss: 0.1519 - acc: 0.9566 16384/60000 [=======>......................] - ETA: 2s - loss: 0.1514 - acc: 0.9565 17344/60000 [=======>......................] - ETA: 2s - loss: 0.1515 - acc: 0.9565 18496/60000 [========>.....................] - ETA: 1s - loss: 0.1524 - acc: 0.9560 19616/60000 [========>.....................] - ETA: 1s - loss: 0.1534 - acc: 0.9555 20704/60000 [=========>....................] - ETA: 1s - loss: 0.1515 - acc: 0.9559 21728/60000 [=========>....................] - ETA: 1s - loss: 0.1511 - acc: 0.9557 22848/60000 [==========>...................] - ETA: 1s - loss: 0.1513 - acc: 0.9556 24000/60000 [===========>..................] - ETA: 1s - loss: 0.1530 - acc: 0.9552 25088/60000 [===========>..................] - ETA: 1s - loss: 0.1525 - acc: 0.9552 26208/60000 [============>.................] - ETA: 1s - loss: 0.1512 - acc: 0.9555 27296/60000 [============>.................] - ETA: 1s - loss: 0.1504 - acc: 0.9558 28416/60000 [=============>................] - ETA: 1s - loss: 0.1495 - acc: 0.9559 29440/60000 [=============>................] - ETA: 1s - loss: 0.1487 - acc: 0.9560 30528/60000 [==============>...............] - ETA: 1s - loss: 0.1489 - acc: 0.9557 31648/60000 [==============>...............] - ETA: 1s - loss: 0.1476 - acc: 0.9559 32768/60000 [===============>..............] - ETA: 1s - loss: 0.1468 - acc: 0.9561 33824/60000 [===============>..............] - ETA: 1s - loss: 0.1466 - acc: 0.9560 34912/60000 [================>.............] - ETA: 1s - loss: 0.1459 - acc: 0.9564 36032/60000 [=================>............] - ETA: 1s - loss: 0.1467 - acc: 0.9562 37184/60000 [=================>............] - ETA: 1s - loss: 0.1467 - acc: 0.9561 38336/60000 [==================>...........] - ETA: 1s - loss: 0.1461 - acc: 0.9560 39424/60000 [==================>...........] - ETA: 0s - loss: 0.1459 - acc: 0.9563 40512/60000 [===================>..........] - ETA: 0s - loss: 0.1463 - acc: 0.9561 41632/60000 [===================>..........] - ETA: 0s - loss: 0.1462 - acc: 0.9561 42784/60000 [====================>.........] - ETA: 0s - loss: 0.1459 - acc: 0.9563 43872/60000 [====================>.........] - ETA: 0s - loss: 0.1454 - acc: 0.9564 44960/60000 [=====================>........] - ETA: 0s - loss: 0.1448 - acc: 0.9567 46080/60000 [======================>.......] - ETA: 0s - loss: 0.1443 - acc: 0.9568 47232/60000 [======================>.......] - ETA: 0s - loss: 0.1442 - acc: 0.9569 48384/60000 [=======================>......] - ETA: 0s - loss: 0.1443 - acc: 0.9569 49440/60000 [=======================>......] - ETA: 0s - loss: 0.1450 - acc: 0.9567 50528/60000 [========================>.....] - ETA: 0s - loss: 0.1448 - acc: 0.9568 51680/60000 [========================>.....] - ETA: 0s - loss: 0.1442 - acc: 0.9569 52800/60000 [=========================>....] - ETA: 0s - loss: 0.1441 - acc: 0.9568 53824/60000 [=========================>....] - ETA: 0s - loss: 0.1437 - acc: 0.9568 54912/60000 [==========================>...] - ETA: 0s - loss: 0.1429 - acc: 0.9570 56032/60000 [===========================>..] - ETA: 0s - loss: 0.1425 - acc: 0.9573 57184/60000 [===========================>..] - ETA: 0s - loss: 0.1423 - acc: 0.9572 58304/60000 [============================>.] - ETA: 0s - loss: 0.1420 - acc: 0.9574 59392/60000 [============================>.] - ETA: 0s - loss: 0.1419 - acc: 0.9576 60000/60000 [==============================] - 3s 47us/step - loss: 0.1420 - acc: 0.9575 Epoch 3/532/60000 [..............................] - ETA: 5s - loss: 0.0595 - acc: 1.00001152/60000 [..............................] - ETA: 2s - loss: 0.1140 - acc: 0.96442304/60000 [>.............................] - ETA: 2s - loss: 0.1166 - acc: 0.96483360/60000 [>.............................] - ETA: 2s - loss: 0.1111 - acc: 0.96524352/60000 [=>............................] - ETA: 2s - loss: 0.1142 - acc: 0.96555312/60000 [=>............................] - ETA: 2s - loss: 0.1164 - acc: 0.96426368/60000 [==>...........................] - ETA: 2s - loss: 0.1162 - acc: 0.96397424/60000 [==>...........................] - ETA: 2s - loss: 0.1123 - acc: 0.96548416/60000 [===>..........................] - ETA: 2s - loss: 0.1096 - acc: 0.96609408/60000 [===>..........................] - ETA: 2s - loss: 0.1092 - acc: 0.9663 10432/60000 [====>.........................] - ETA: 2s - loss: 0.1083 - acc: 0.9659 11520/60000 [====>.........................] - ETA: 2s - loss: 0.1081 - acc: 0.9657 12640/60000 [=====>........................] - ETA: 2s - loss: 0.1085 - acc: 0.9659 13664/60000 [=====>........................] - ETA: 2s - loss: 0.1095 - acc: 0.9657 14688/60000 [======>.......................] - ETA: 2s - loss: 0.1110 - acc: 0.9651 15744/60000 [======>.......................] - ETA: 2s - loss: 0.1121 - acc: 0.9653 16800/60000 [=======>......................] - ETA: 2s - loss: 0.1120 - acc: 0.9655 17792/60000 [=======>......................] - ETA: 2s - loss: 0.1125 - acc: 0.9654 18784/60000 [========>.....................] - ETA: 2s - loss: 0.1125 - acc: 0.9655 19840/60000 [========>.....................] - ETA: 1s - loss: 0.1129 - acc: 0.9657 20896/60000 [=========>....................] - ETA: 1s - loss: 0.1131 - acc: 0.9657 21952/60000 [=========>....................] - ETA: 1s - loss: 0.1122 - acc: 0.9658 23008/60000 [==========>...................] - ETA: 1s - loss: 0.1119 - acc: 0.9658 24064/60000 [===========>..................] - ETA: 1s - loss: 0.1117 - acc: 0.9658 25120/60000 [===========>..................] - ETA: 1s - loss: 0.1105 - acc: 0.9662 26208/60000 [============>.................] - ETA: 1s - loss: 0.1094 - acc: 0.9665 27360/60000 [============>.................] - ETA: 1s - loss: 0.1093 - acc: 0.9665 28256/60000 [=============>................] - ETA: 1s - loss: 0.1090 - acc: 0.9666 29248/60000 [=============>................] - ETA: 1s - loss: 0.1095 - acc: 0.9664 29856/60000 [=============>................] - ETA: 1s - loss: 0.1088 - acc: 0.9666 30528/60000 [==============>...............] - ETA: 1s - loss: 0.1082 - acc: 0.9668 31104/60000 [==============>...............] - ETA: 1s - loss: 0.1080 - acc: 0.9669 32000/60000 [===============>..............] - ETA: 1s - loss: 0.1072 - acc: 0.9671 33056/60000 [===============>..............] - ETA: 1s - loss: 0.1072 - acc: 0.9671 34144/60000 [================>.............] - ETA: 1s - loss: 0.1080 - acc: 0.9669 35232/60000 [================>.............] - ETA: 1s - loss: 0.1075 - acc: 0.9669 36352/60000 [=================>............] - ETA: 1s - loss: 0.1077 - acc: 0.9666 37504/60000 [=================>............] - ETA: 1s - loss: 0.1085 - acc: 0.9664 38560/60000 [==================>...........] - ETA: 1s - loss: 0.1085 - acc: 0.9664 39616/60000 [==================>...........] - ETA: 1s - loss: 0.1082 - acc: 0.9663 40608/60000 [===================>..........] - ETA: 0s - loss: 0.1078 - acc: 0.9665 41632/60000 [===================>..........] - ETA: 0s - loss: 0.1075 - acc: 0.9664 42688/60000 [====================>.........] - ETA: 0s - loss: 0.1077 - acc: 0.9663 43616/60000 [====================>.........] - ETA: 0s - loss: 0.1080 - acc: 0.9664 44672/60000 [=====================>........] - ETA: 0s - loss: 0.1077 - acc: 0.9665 45696/60000 [=====================>........] - ETA: 0s - loss: 0.1075 - acc: 0.9666 46720/60000 [======================>.......] - ETA: 0s - loss: 0.1079 - acc: 0.9664 47744/60000 [======================>.......] - ETA: 0s - loss: 0.1080 - acc: 0.9664 48768/60000 [=======================>......] - ETA: 0s - loss: 0.1085 - acc: 0.9664 49792/60000 [=======================>......] - ETA: 0s - loss: 0.1083 - acc: 0.9664 50848/60000 [========================>.....] - ETA: 0s - loss: 0.1082 - acc: 0.9665 51936/60000 [========================>.....] - ETA: 0s - loss: 0.1077 - acc: 0.9667 52992/60000 [=========================>....] - ETA: 0s - loss: 0.1075 - acc: 0.9668 54112/60000 [==========================>...] - ETA: 0s - loss: 0.1069 - acc: 0.9670 55232/60000 [==========================>...] - ETA: 0s - loss: 0.1064 - acc: 0.9671 56288/60000 [===========================>..] - ETA: 0s - loss: 0.1062 - acc: 0.9671 57376/60000 [===========================>..] - ETA: 0s - loss: 0.1064 - acc: 0.9671 58464/60000 [============================>.] - ETA: 0s - loss: 0.1060 - acc: 0.9672 59520/60000 [============================>.] - ETA: 0s - loss: 0.1058 - acc: 0.9673 60000/60000 [==============================] - 3s 50us/step - loss: 0.1059 - acc: 0.9672 Epoch 4/532/60000 [..............................] - ETA: 7s - loss: 0.0554 - acc: 1.00001152/60000 [..............................] - ETA: 2s - loss: 0.1027 - acc: 0.96702240/60000 [>.............................] - ETA: 2s - loss: 0.0849 - acc: 0.97233264/60000 [>.............................] - ETA: 2s - loss: 0.0782 - acc: 0.97584256/60000 [=>............................] - ETA: 2s - loss: 0.0775 - acc: 0.97565280/60000 [=>............................] - ETA: 2s - loss: 0.0776 - acc: 0.97596304/60000 [==>...........................] - ETA: 2s - loss: 0.0799 - acc: 0.97517360/60000 [==>...........................] - ETA: 2s - loss: 0.0833 - acc: 0.97248480/60000 [===>..........................] - ETA: 2s - loss: 0.0861 - acc: 0.97199600/60000 [===>..........................] - ETA: 2s - loss: 0.0868 - acc: 0.9724 10688/60000 [====>.........................] - ETA: 2s - loss: 0.0854 - acc: 0.9730 11776/60000 [====>.........................] - ETA: 2s - loss: 0.0840 - acc: 0.9732 12800/60000 [=====>........................] - ETA: 2s - loss: 0.0837 - acc: 0.9734 13856/60000 [=====>........................] - ETA: 2s - loss: 0.0841 - acc: 0.9730 14944/60000 [======>.......................] - ETA: 2s - loss: 0.0826 - acc: 0.9737 16000/60000 [=======>......................] - ETA: 2s - loss: 0.0833 - acc: 0.9733 16992/60000 [=======>......................] - ETA: 2s - loss: 0.0843 - acc: 0.9729 17984/60000 [=======>......................] - ETA: 2s - loss: 0.0844 - acc: 0.9731 19040/60000 [========>.....................] - ETA: 1s - loss: 0.0853 - acc: 0.9727 19776/60000 [========>.....................] - ETA: 1s - loss: 0.0856 - acc: 0.9724 20832/60000 [=========>....................] - ETA: 1s - loss: 0.0861 - acc: 0.9724 21984/60000 [=========>....................] - ETA: 1s - loss: 0.0851 - acc: 0.9726 23136/60000 [==========>...................] - ETA: 1s - loss: 0.0848 - acc: 0.9730 23904/60000 [==========>...................] - ETA: 1s - loss: 0.0845 - acc: 0.9729 24352/60000 [===========>..................] - ETA: 1s - loss: 0.0847 - acc: 0.9728 25152/60000 [===========>..................] - ETA: 1s - loss: 0.0844 - acc: 0.9729 26144/60000 [============>.................] - ETA: 1s - loss: 0.0847 - acc: 0.9726 26880/60000 [============>.................] - ETA: 1s - loss: 0.0844 - acc: 0.9727 27264/60000 [============>.................] - ETA: 1s - loss: 0.0850 - acc: 0.9726 27648/60000 [============>.................] - ETA: 1s - loss: 0.0849 - acc: 0.9726 28224/60000 [=============>................] - ETA: 1s - loss: 0.0848 - acc: 0.9727 29024/60000 [=============>................] - ETA: 1s - loss: 0.0854 - acc: 0.9727 30016/60000 [==============>...............] - ETA: 1s - loss: 0.0863 - acc: 0.9724 30784/60000 [==============>...............] - ETA: 1s - loss: 0.0863 - acc: 0.9725 31680/60000 [==============>...............] - ETA: 1s - loss: 0.0860 - acc: 0.9727 32512/60000 [===============>..............] - ETA: 1s - loss: 0.0864 - acc: 0.9727 33440/60000 [===============>..............] - ETA: 1s - loss: 0.0862 - acc: 0.9728 34336/60000 [================>.............] - ETA: 1s - loss: 0.0864 - acc: 0.9727 35360/60000 [================>.............] - ETA: 1s - loss: 0.0869 - acc: 0.9725 36320/60000 [=================>............] - ETA: 1s - loss: 0.0868 - acc: 0.9727 37312/60000 [=================>............] - ETA: 1s - loss: 0.0873 - acc: 0.9727 38336/60000 [==================>...........] - ETA: 1s - loss: 0.0871 - acc: 0.9727 39296/60000 [==================>...........] - ETA: 1s - loss: 0.0869 - acc: 0.9727 40224/60000 [===================>..........] - ETA: 1s - loss: 0.0882 - acc: 0.9723 41120/60000 [===================>..........] - ETA: 1s - loss: 0.0887 - acc: 0.9721 42112/60000 [====================>.........] - ETA: 0s - loss: 0.0890 - acc: 0.9721 43008/60000 [====================>.........] - ETA: 0s - loss: 0.0894 - acc: 0.9719 43904/60000 [====================>.........] - ETA: 0s - loss: 0.0895 - acc: 0.9719 44832/60000 [=====================>........] - ETA: 0s - loss: 0.0896 - acc: 0.9720 45248/60000 [=====================>........] - ETA: 0s - loss: 0.0895 - acc: 0.9720 45920/60000 [=====================>........] - ETA: 0s - loss: 0.0895 - acc: 0.9720 46496/60000 [======================>.......] - ETA: 0s - loss: 0.0892 - acc: 0.9721 47360/60000 [======================>.......] - ETA: 0s - loss: 0.0888 - acc: 0.9722 48320/60000 [=======================>......] - ETA: 0s - loss: 0.0891 - acc: 0.9722 49248/60000 [=======================>......] - ETA: 0s - loss: 0.0897 - acc: 0.9719 50016/60000 [========================>.....] - ETA: 0s - loss: 0.0897 - acc: 0.9720 50976/60000 [========================>.....] - ETA: 0s - loss: 0.0895 - acc: 0.9720 51968/60000 [========================>.....] - ETA: 0s - loss: 0.0895 - acc: 0.9720 52960/60000 [=========================>....] - ETA: 0s - loss: 0.0897 - acc: 0.9720 53952/60000 [=========================>....] - ETA: 0s - loss: 0.0894 - acc: 0.9721 54976/60000 [==========================>...] - ETA: 0s - loss: 0.0892 - acc: 0.9723 56000/60000 [===========================>..] - ETA: 0s - loss: 0.0892 - acc: 0.9723 56992/60000 [===========================>..] - ETA: 0s - loss: 0.0889 - acc: 0.9724 57952/60000 [===========================>..] - ETA: 0s - loss: 0.0889 - acc: 0.9724 58976/60000 [============================>.] - ETA: 0s - loss: 0.0888 - acc: 0.9724 59936/60000 [============================>.] - ETA: 0s - loss: 0.0888 - acc: 0.9724 60000/60000 [==============================] - 3s 56us/step - loss: 0.0889 - acc: 0.9724 Epoch 5/532/60000 [..............................] - ETA: 7s - loss: 0.0152 - acc: 1.00001088/60000 [..............................] - ETA: 2s - loss: 0.0728 - acc: 0.97702080/60000 [>.............................] - ETA: 2s - loss: 0.0726 - acc: 0.97883008/60000 [>.............................] - ETA: 2s - loss: 0.0716 - acc: 0.97813968/60000 [>.............................] - ETA: 2s - loss: 0.0679 - acc: 0.97985024/60000 [=>............................] - ETA: 2s - loss: 0.0709 - acc: 0.97876048/60000 [==>...........................] - ETA: 2s - loss: 0.0705 - acc: 0.97836976/60000 [==>...........................] - ETA: 2s - loss: 0.0688 - acc: 0.97827840/60000 [==>...........................] - ETA: 2s - loss: 0.0699 - acc: 0.97798768/60000 [===>..........................] - ETA: 2s - loss: 0.0723 - acc: 0.97729600/60000 [===>..........................] - ETA: 2s - loss: 0.0717 - acc: 0.9769 10496/60000 [====>.........................] - ETA: 2s - loss: 0.0711 - acc: 0.9768 11424/60000 [====>.........................] - ETA: 2s - loss: 0.0707 - acc: 0.9772 12352/60000 [=====>........................] - ETA: 2s - loss: 0.0720 - acc: 0.9771 13344/60000 [=====>........................] - ETA: 2s - loss: 0.0726 - acc: 0.9775 14304/60000 [======>.......................] - ETA: 2s - loss: 0.0735 - acc: 0.9773 15328/60000 [======>.......................] - ETA: 2s - loss: 0.0725 - acc: 0.9779 16224/60000 [=======>......................] - ETA: 2s - loss: 0.0729 - acc: 0.9777 17184/60000 [=======>......................] - ETA: 2s - loss: 0.0740 - acc: 0.9774 18080/60000 [========>.....................] - ETA: 2s - loss: 0.0743 - acc: 0.9770 19008/60000 [========>.....................] - ETA: 2s - loss: 0.0750 - acc: 0.9766 19936/60000 [========>.....................] - ETA: 2s - loss: 0.0749 - acc: 0.9767 20896/60000 [=========>....................] - ETA: 2s - loss: 0.0745 - acc: 0.9769 21568/60000 [=========>....................] - ETA: 2s - loss: 0.0739 - acc: 0.9770 22432/60000 [==========>...................] - ETA: 2s - loss: 0.0751 - acc: 0.9765 23328/60000 [==========>...................] - ETA: 2s - loss: 0.0745 - acc: 0.9766 24192/60000 [===========>..................] - ETA: 1s - loss: 0.0749 - acc: 0.9767 25056/60000 [===========>..................] - ETA: 1s - loss: 0.0744 - acc: 0.9770 25920/60000 [===========>..................] - ETA: 1s - loss: 0.0739 - acc: 0.9770 26848/60000 [============>.................] - ETA: 1s - loss: 0.0745 - acc: 0.9769 27840/60000 [============>.................] - ETA: 1s - loss: 0.0753 - acc: 0.9768 28800/60000 [=============>................] - ETA: 1s - loss: 0.0757 - acc: 0.9765 29792/60000 [=============>................] - ETA: 1s - loss: 0.0755 - acc: 0.9766 30816/60000 [==============>...............] - ETA: 1s - loss: 0.0756 - acc: 0.9765 31872/60000 [==============>...............] - ETA: 1s - loss: 0.0750 - acc: 0.9768 32864/60000 [===============>..............] - ETA: 1s - loss: 0.0754 - acc: 0.9766 33824/60000 [===============>..............] - ETA: 1s - loss: 0.0754 - acc: 0.9766 34752/60000 [================>.............] - ETA: 1s - loss: 0.0757 - acc: 0.9764 35744/60000 [================>.............] - ETA: 1s - loss: 0.0753 - acc: 0.9765 36704/60000 [=================>............] - ETA: 1s - loss: 0.0754 - acc: 0.9765 37696/60000 [=================>............] - ETA: 1s - loss: 0.0756 - acc: 0.9763 38624/60000 [==================>...........] - ETA: 1s - loss: 0.0755 - acc: 0.9762 39616/60000 [==================>...........] - ETA: 1s - loss: 0.0749 - acc: 0.9764 40576/60000 [===================>..........] - ETA: 1s - loss: 0.0744 - acc: 0.9766 41536/60000 [===================>..........] - ETA: 1s - loss: 0.0747 - acc: 0.9766 42528/60000 [====================>.........] - ETA: 0s - loss: 0.0748 - acc: 0.9764 43520/60000 [====================>.........] - ETA: 0s - loss: 0.0746 - acc: 0.9765 44512/60000 [=====================>........] - ETA: 0s - loss: 0.0746 - acc: 0.9765 45472/60000 [=====================>........] - ETA: 0s - loss: 0.0744 - acc: 0.9766 46432/60000 [======================>.......] - ETA: 0s - loss: 0.0745 - acc: 0.9765 47456/60000 [======================>.......] - ETA: 0s - loss: 0.0743 - acc: 0.9766 48416/60000 [=======================>......] - ETA: 0s - loss: 0.0744 - acc: 0.9766 49472/60000 [=======================>......] - ETA: 0s - loss: 0.0744 - acc: 0.9765 50528/60000 [========================>.....] - ETA: 0s - loss: 0.0742 - acc: 0.9766 51584/60000 [========================>.....] - ETA: 0s - loss: 0.0743 - acc: 0.9765 52512/60000 [=========================>....] - ETA: 0s - loss: 0.0750 - acc: 0.9763 53408/60000 [=========================>....] - ETA: 0s - loss: 0.0750 - acc: 0.9763 54336/60000 [==========================>...] - ETA: 0s - loss: 0.0749 - acc: 0.9763 55136/60000 [==========================>...] - ETA: 0s - loss: 0.0751 - acc: 0.9762 56000/60000 [===========================>..] - ETA: 0s - loss: 0.0751 - acc: 0.9762 56032/60000 [===========================>..] - ETA: 0s - loss: 0.0752 - acc: 0.9761 56960/60000 [===========================>..] - ETA: 0s - loss: 0.0753 - acc: 0.9761 57856/60000 [===========================>..] - ETA: 0s - loss: 0.0751 - acc: 0.9761 58752/60000 [============================>.] - ETA: 0s - loss: 0.0751 - acc: 0.9762 59712/60000 [============================>.] - ETA: 0s - loss: 0.0749 - acc: 0.9763 60000/60000 [==============================] - 3s 56us/step - loss: 0.0748 - acc: 0.976232/10000 [..............................] - ETA: 16s4384/10000 [============>.................] - ETA: 0s 8800/10000 [=========================>....] - ETA: 0s 10000/10000 [==============================] - 0s 17us/stepProcess finished with exit code 0?
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的TensorFlow版的“Hello World”,运行官网第一个例子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TensorFlow、MXNet、Ker
- 下一篇: TensorFlow Keras 官方教