知乎上的回答
tensorflow官方认证地址
考取google Tensorflow认证的流程
另一个老外的TensorFlow考试经历

Tensorflow考试准备

官方考试手册
配置考试环境
官方教程

学习教程

吴恩达课程学习笔记

AI技术文章

容量、过拟合和欠拟合
深度学习中过拟合、欠拟合问题及解决方案
熵,交叉熵,二分类交叉熵/Entropy, crossentropy, binary crossentropy
正则化
正则化消除过拟合

AI前沿思考

陈德旺对Deepmind的成功的探讨

笔记本电脑上训练

PS: 可以通过Nvidia的显卡加速, 不过在i7-8550U+MX150上测试, MX150似乎比CPU还慢.

使用MX150:

2021-08-23 11:01:05.658828: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll
2021-08-23 11:01:05.661719: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll
2021-08-23 11:01:05.667080: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll
2021-08-23 11:01:05.672298: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll
2021-08-23 11:01:05.681747: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll
2021-08-23 11:01:05.681986: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021-08-23 11:01:05.682349: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-08-23 11:01:05.683329: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA GeForce MX150 computeCapability: 6.1
coreClock: 1.341GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 37.33GiB/s
2021-08-23 11:01:05.683674: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021-08-23 11:01:06.781669: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-08-23 11:01:06.781862: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264]      0 
2021-08-23 11:01:06.781974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0:   N 
2021-08-23 11:01:06.784405: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1332 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2021-08-23 11:01:07.432975: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
Epoch 1/5
2021-08-23 11:01:07.782500: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll
2021-08-23 11:01:08.920483: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll
1875/1875 [==============================] - 6s 2ms/step - loss: 0.2974 - accuracy: 0.9155
Epoch 2/5
1875/1875 [==============================] - 5s 2ms/step - loss: 0.1430 - accuracy: 0.9569
Epoch 3/5
1875/1875 [==============================] - 5s 2ms/step - loss: 0.1057 - accuracy: 0.9685
Epoch 4/5
1875/1875 [==============================] - 5s 2ms/step - loss: 0.0867 - accuracy: 0.9742
Epoch 5/5
1875/1875 [==============================] - 5s 3ms/step - loss: 0.0741 - accuracy: 0.9764
313/313 - 1s - loss: 0.0704 - accuracy: 0.9784

Process finished with exit code 0

上面MX150的Epoch每一项在5~6秒, 而使用CPU只需要1~2秒:


D:\r\pyproj\TFproj1\venv\Scripts\python.exe D:/r/pyproj/TFproj1/main.py
2021-08-23 11:04:35.810645: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
2.5.0
2021-08-23 11:04:39.140247: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll
2021-08-23 11:04:39.791839: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA GeForce MX150 computeCapability: 6.1
coreClock: 1.341GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 37.33GiB/s
2021-08-23 11:04:39.792157: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
2021-08-23 11:04:39.808505: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll
2021-08-23 11:04:39.808676: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll
2021-08-23 11:04:39.813804: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll
2021-08-23 11:04:39.816603: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll
2021-08-23 11:04:39.822109: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll
2021-08-23 11:04:39.827115: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll
2021-08-23 11:04:39.832314: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
2021-08-23 11:04:39.832637: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-08-23 11:04:39.833777: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-08-23 11:04:39.834660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-08-23 11:04:39.834922: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264]      
2021-08-23 11:04:40.297728: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
Epoch 1/5
1875/1875 [==============================] - 2s 840us/step - loss: 0.2934 - accuracy: 0.9141
Epoch 2/5
1875/1875 [==============================] - 1s 764us/step - loss: 0.1421 - accuracy: 0.9578
Epoch 3/5
1875/1875 [==============================] - 2s 853us/step - loss: 0.1091 - accuracy: 0.9674
Epoch 4/5
1875/1875 [==============================] - 2s 1ms/step - loss: 0.0881 - accuracy: 0.9730
Epoch 5/5
1875/1875 [==============================] - 2s 1ms/step - loss: 0.0763 - accuracy: 0.9759
313/313 - 0s - loss: 0.0729 - accuracy: 0.9780

Process finished with exit code 0

标签: none 阅读量: 1023

添加新评论