您当前的位置: 首页 >  tensorflow
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决AttributeError: module tensorflow.image has no attribute resize

一个处女座的程序猿 发布时间:2020-05-29 08:54:50 ,浏览量:0

成功解决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)

哈哈,大功告成!

 

 

 

 

 

 

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.1237s