zl程序教程

您现在的位置是:首页 >  其它

当前栏目

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

提示 No object Tensorflow module has attribute 出错
2023-09-14 09:10:42 时间

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

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。

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


1. C++标准模板库从入门到精通 

2.跟老菜鸟学C++

3. 跟老菜鸟学python

4. 在VC2015里学会使用tinyxml库

5. 在Windows下SVN的版本管理与实战 

 http://edu.csdn.net/course/detail/2579

6.Visual Studio 2015开发C++程序的基本使用 

http://edu.csdn.net/course/detail/2570

7.在VC2015里使用protobuf协议

8.在VC2015里学会使用MySQL数据库