首页 > 其他 > 详细

tensorflow提示出错'module' object has no attribute 'pack'

时间:2017-08-13 11:58:47      阅读:279      评论:0      收藏:0      [点我收藏+]

编译旧的代码,会像下面这样提示出错:

deconv_shape3 = tf.pack([shape[0], shape[1], shape[2], NUM_OF_CLASSESS])

AttributeError: ‘module‘ object has no attribute ‘pack‘

 

因为TF后面的版本修改了这个函数的名称,把tf.pack改为 tf.stack。

因此只需要替换掉,就可以编译通过了。

 

tensorflow提示出错'module' object has no attribute 'pack'

原文:http://www.cnblogs.com/xqnq2007/p/7352713.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!