
TensorFlow
Wsyoneself
随遇随记,共同学习,欢迎评论和讨论!
wsywsywsywsywsy979
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
weight pruning(权重剪枝)--学习笔记
weight pruning(权重剪枝)--学习笔记原创 2022-12-16 09:50:45 · 3233 阅读 · 0 评论 -
关于.model.meta,.model.index,.model.data-00000-of-00001--学习笔记
关于.model.meta,.model.index,.model.data-00000-of-00001--学习笔记原创 2022-11-02 13:41:55 · 1621 阅读 · 2 评论 -
tensorflow编程知识(持续更新,持续记录)
1. tf.app.run():是函数入口,类似于c++中的main(),可以解析命令行参数2. 定义参数: 1. 例子:tf.app.flags.DEFINE_string('string', 'myname', 'The type of myname is string') 2. 参数:参数名称,参数默认值,参数描述3. tf 中定义了 tf.app.flags.FLAGS ,用于接受从终端传入的命令行参数,相当于对python中的命令行参数模块optpars做了一层封装。4.原创 2022-06-03 14:44:07 · 217 阅读 · 0 评论 -
import tensorflow.compat.v1 as tf 解析不了(警告)
使用原因:想运行使用TensorFlow1写的代码,但环境是TensorFlow2,不想卸载重装。虽然可以通过查资料将TensorFlow1中使用的函数和模块在TensorFlow2中找到,但改动太大,且有些对应函数参数甚至相反。所以放弃。尝试解决:方法一:import tensorflow.compat.v1 as tfTensorFlow2中可使用此方法使用tensorflow1解决方法:import tensorflow._api.v2.compat.v1 as tftf.d原创 2022-05-18 12:54:38 · 9434 阅读 · 8 评论 -
报错: ValueError: Input 0 of layer “conv2d“ is incompatible with the layer: expected min_ndim=4, found
完整报错: ValueError: Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=3. Full shape received: (None, 28, 28)原因:卷积计算要求输入的图片必须是4个维度的解决: x_train = np.expand_dims(x_train, axis=3)x_test = np.expand_dims(x_test, axi.原创 2022-03-24 20:58:35 · 1580 阅读 · 0 评论 -
报错:tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: cudaGetErr
完整报错:tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: cudaGetErrorString symbol not found.原创 2022-03-24 11:09:32 · 3902 阅读 · 0 评论