成功解决AttributeError: module tensorflow.image has no attribute resize
生活随笔
收集整理的這篇文章主要介紹了
成功解决AttributeError: module tensorflow.image has no attribute resize
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決AttributeError: module tensorflow.image has no attribute resize
?
?
目錄
解決問題
解決思路
解決方法
?
解決問題
AttributeError: module 'tensorflow.image' has no attribute 'resize'
?
?
?
解決思路
屬性錯誤:模塊'tensorflow。image沒有屬性resize
版本不同造成的錯誤!
?
?
?
解決方法
將
b4 = Lambda(lambda x: tf.image.resize(x, size_before[1:3], # 20200529 本文件內此后代碼均直接替代!b4 = Lambda(lambda x: tf.compat.v1.image.resize(x, size_before[1:3],method='bilinear', align_corners=True))(b4)替換為
# b4 = Lambda(lambda x: tf.compat.v1.image.resize(x, size_before[1:3], # method='bilinear', align_corners=True))(b4)b4 = Lambda(lambda x: tf.image.resize_bilinear(x, size_before[1:3], # 20200529 本文件內此后代碼均直接替代!b4 = Lambda(lambda x: tf.compat.v1.image.resize(x, size_before[1:3],align_corners=True))(b4)哈哈,大功告成!
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的成功解决AttributeError: module tensorflow.image has no attribute resize的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成功解决 pypmml.base.Pmm
- 下一篇: 成功解决AttributeError: