Tensorflow由于版本问题出现的几种错误及解决办法
2017-12-28 20:34
609 查看
1、AttributeError: 'module' object has no attribute 'rnn_cell'
S:将tf.nn.rnn_cell替换为tf.contrib.rnn
2、TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
S:由于tf.concat的问题,将tf.concat(1, [conv1, conv2]) 的格式替换为tf.concat( [conv1, conv2],1)
3、AttributeError: 'module' object has no attribute 'pack'
S:将pack替换为stack
4、ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
S:按照提示,需要将括号内的形参写出,即(logits=pre, lables=tru)而非(pre,tru)
5、ValueError: Variable Wemb/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?
S:需要定义scope,虽然报错可能是在optimizer处提示,但需要在定义模型时增加scope,即
with tf.variable_scope(tf.get_variable_scope()) as scope:
# model construction
S:将tf.nn.rnn_cell替换为tf.contrib.rnn
2、TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
S:由于tf.concat的问题,将tf.concat(1, [conv1, conv2]) 的格式替换为tf.concat( [conv1, conv2],1)
3、AttributeError: 'module' object has no attribute 'pack'
S:将pack替换为stack
4、ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
S:按照提示,需要将括号内的形参写出,即(logits=pre, lables=tru)而非(pre,tru)
5、ValueError: Variable Wemb/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?
S:需要定义scope,虽然报错可能是在optimizer处提示,但需要在定义模型时增加scope,即
with tf.variable_scope(tf.get_variable_scope()) as scope:
# model construction
相关文章推荐
- 浅谈Tensorflow由于版本问题出现的几种错误及解决方法
- Struts2初学devMode发展模式,更改action出现映射错误解决办法(原因是版本问题,轻松解决)
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- Excel出现“由于本机的限制,该操作已被取消,请与系统管理员联系”问题的解决办法。
- phpmyadmin 出现Cannot start session without errors 错误 总结的几种原因和解决办法
- mysql4.1以上版本连接时出现Client does not support authentication protocol问题解决办法
- 打开office出现错误:向程序发送命令时出现问题 无法更改 中注册的office 加载项的连接状态 解决办法
- 【078】docute.js的v3.4.8版本在IE11下出现【对象不支持“from”属性或方法】错误的解决办法
- 打开Office时出现“运行时错误91”问题的解决办法
- 使用JCMS2.5.7版本预览出现问题的解决办法。
- 网狐荣耀316版本出现“诈金花下载失败,错误码:7,92的解决办法
- 关于maven出现Missing artifact oracle:ojdbc14:jar:10.2.0.4.0错误的问题解决办法
- 出现 "System.Data.OracleClient 需要 Oracle 客户端软件 8.1.7 或更高版本" 错误的解决办法
- TensorFlow中常见的由于API版本问题导致的错误汇总
- ssh 登录出现的几种错误以及解决办法
- 还原数据库时出现的问题 “设备激活错误”的解决办法
- jsp跳转到servlet 出现 404 路径错误的问题解决办法
- vs中由低版本转换为高版本出现如下错误的解决办法
- phpmyadmin 出现Cannot start session without errors 错误 总结的几种原因和解决办法