IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]tensorflow提示出错\'module\' object has no attribute \'pack\'

    caimouse发表于 2017-03-05 11:26:23
    love 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。

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


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

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

    2.跟老菜鸟学C++

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

    3. 跟老菜鸟学python

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

    4. 在VC2015里学会使用tinyxml库

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

    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协议

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

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

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



沪ICP备19023445号-2号
友情链接