Tensorflow2.0常见问题汇总

1. Tensorflow安装错误之 Cannot uninstall wrapt

使用下面的命令即可避免该错误:

pip install wrapt --ignore-installed

参考:https://blog.csdn.net/weixin_41923658/article/details/96127770

2. 安利2个很好的学习Tensorflow2.0的教程

https://github.com/czy36mengfei/tensorflow2_tutorials_chinese

https://github.com/dragen1860/Deep-Learning-with-TensorFlow-book

3. UserWarning: Method on_batch_end() is slow compared to the batch update. Check your callbacks.

history=model.fit(X_train,y_train,epochs=30,batch_size=32,validation_split=0.2,verbose=2)

出现的原因是一开始berbose=1(默认),在一个epoch中训练一个batch就会打印进度条和结果,但是打印到控制台所需时间比训练模型时间更长,所以有了警告。

将verbose=0,使得一点训练过程信息也不打印;verbose=2,每一个epoch打印一次。

参考:https://blog.csdn.net/weixin_30376453/article/details/97068183

4. tf.layers.dropout用法

https://blog.csdn.net/o0haidee0o/article/details/80514578

5. Keras.layers.Dense()方法详解

https://blog.csdn.net/boke_xiaoyuan/article/details/78281038

你可能感兴趣的:(Tensorflow学习)