我正在尝试从 model.json 文件加载模型架构,但出现以下错误:
AttributeError: module 'tensorflow.compat.v2.image' has no attribute 'resize_bilinear'
这就是我加载 json 文件的方式:
from tensorflow.keras.models import model_from_json
with open("model.json", "r") as file:
model_json = file.read()
loaded_model = model_from_json(model_json)
我已经从这个 github repo 下载了这个 json 文件
https://github.com/janzd/EAST
谢谢。