tensorflow基本使用中出现的问题及解决方案
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow

·
问题
- 由于版本更新,
tensorflow
中有些函数更新,在此做一些记录, - 这里所用的版本是
1.0
问题所在的链接:http://www.cnblogs.com/wangxiaocvpr/p/5893791.html
问题类型:
'module' object has no attribute
- 比如
sub
函数找不到,一般是由于版本更新导致函数被舍弃,可以从:https://www.tensorflow.org/api_guides/python/math_ops上面查到,函数变为了subtract
- 比如
问题代码
tf.zeros((2,2)) print(ta)
当前版本不支持这种方式,可以采用下面的方式显示数据
ta = tf.zeros((2,2)) sess = tf.Session() print(sess.run(ta))




一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
4f64a3d5
Instead, check for this case in `ResolveUsers` and `ResolveOperand`, by querying whether the `fused_expression_root` is part of the `HloFusionAdaptor`.
This prevents us from stepping into nested fusions.
PiperOrigin-RevId: 724311958
1 个月前
aa7e952e
Fix a bug in handling negative strides, and add a test case that exposes it.
We can have negative strides that are not just -1, e.g. with a combining
reshape.
PiperOrigin-RevId: 724293790
1 个月前
更多推荐
所有评论(0)