TensorFlow报错:AttributeError: module 'tensorflow' has no attribute 'unpack' (‘pack’)

TensorFlow报错:AttributeError: module ‘tensorflow’ has no attribute ‘unpack’ (‘pack’)

如图

在这里插入图片描述

AttributeError: module ‘tensorflow’ has no attribute ‘unpack’

分析:Tensorflow1.0+版本更新后,方法名变更

解决方式

报错 更新前 更新后
AttributeError: module ‘tensorflow’ has no attribute ‘unpack’ tf.unpack() tf.unstack()
AttributeError: module ‘tensorflow’ has no attribute ‘pack’ tf.pack() tf.stack()

你可能感兴趣的:(TensorFlow)