You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
The ONNX operator number change on the optimization: 1092 -> 474
The text was updated successfully, but these errors were encountered:
以下是我做的一些尝试,但是都失败了:
import keras2onnx,keras
import onnx
from nets.yolo4 import yolo_body
from keras.models import load_model
num_anchors = 9
num_classes = 12
model_path = r'E:/python_pro/test/model_data/last1.h5'
model = yolo_body(Input(shape=(None,None,3)), num_anchors//3, num_classes)
model.load_weights(model_path)
onnx_model = keras2onnx.convert_keras(model, model.name)
temp_model_file = r'E:/python_pro/test/model_data/yolo4.onnx'
onnx.save_model(onnx_model, temp_model_file)
此段代码会报如下错误:
Using TensorFlow backend.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
The ONNX operator number change on the optimization: 1092 -> 474
The text was updated successfully, but these errors were encountered: