【发布时间】:2020-05-14 16:04:42
【问题描述】:
在运行代码 tf.matrix_band_part 时,我收到以下错误
AttributeError: module 'tensorflow' has no attribute 'matrix_band_part'
我的张量流版本:2.0
这个问题需要任何解决方案。
【问题讨论】:
标签: tensorflow2.0 attributeerror
在运行代码 tf.matrix_band_part 时,我收到以下错误
AttributeError: module 'tensorflow' has no attribute 'matrix_band_part'
我的张量流版本:2.0
这个问题需要任何解决方案。
【问题讨论】:
标签: tensorflow2.0 attributeerror
我找到了答案。所以我想分享一下。
tensorflow 2.0 的兼容版本是
tf.compat.v1.matrix_band_part
参考:https://www.tensorflow.org/api_docs/python/tf/linalg/band_part
【讨论】: