diff --git a/data/squeezenet_cifar10.onnx b/data/squeezenet_cifar10.onnx index 3401106..9a667a7 100644 Binary files a/data/squeezenet_cifar10.onnx and b/data/squeezenet_cifar10.onnx differ diff --git a/utils/export_squeezenet_cifar10.py b/utils/export_squeezenet_cifar10.py index f859d59..9f9da9f 100644 --- a/utils/export_squeezenet_cifar10.py +++ b/utils/export_squeezenet_cifar10.py @@ -3,13 +3,13 @@ import tensorflow as tf import onnx -import keras2onnx +import tf2onnx.convert with open(os.path.join(sys.argv[1], 'models', 'squeeze_net.json')) as f: model_json = f.read() model = tf.keras.models.model_from_json(model_json) model.load_weights(os.path.join(sys.argv[1], 'models', 'squeeze_net.h5')) -onnx_model = keras2onnx.convert_keras(model, model.name) +onnx_model, _ = tf2onnx.convert.from_keras(model) onnx.save(onnx_model, 'squeezenet_cifar10.onnx')