python - AttributeError:模块“tensorflow_core._api.v2.image”没有属性“resize_images”
问题描述
我想将图像从 28*28 调整为 32*32,使用。tf.image.resize_images(x_train, (32, 32))
它返回AttributeError: module 'tensorflow_core._api.v2.image' has no attribute 'resize_images' 。 tersorflow 的版本是 2.0.0。我该如何解决?
解决方案
应该是tf.image.resize
查看更新的文档https://www.tensorflow.org/api_docs/python/tf/image/resize
推荐阅读
- java - spring boot项目定义依赖类为spring bean
- c# - 使用来自 C# 的解析参数执行 Python 脚本
- javascript - 窗口滚动事件——是否需要防止冒泡?
- awk - 从文件打印字符串和输入
- powershell - Windows 7 上的 PowerShell SMTPClient 失败(“需要身份验证”);适用于 Windows 10
- swift - 小窗口的大小
- python - 在 google colab 中运行 python 脚本,nohup 给出 ImportError
- python - Jupyer 无法识别不确定性库
- python - 每次运行 Python 脚本时,如何关闭使用 Python 脚本创建的现有文件?
- c# - basicHttpBinding、netTcpBinding、protobuff扩展的序列化性能