cinastanbean / pytorch-onnx-tensorflow-pb Goto Github PK
View Code? Open in Web Editor NEWConverting A PyTorch Model to Tensorflow pb using ONNX
Converting A PyTorch Model to Tensorflow pb using ONNX
你好!我把pytorch模型转换成onnx后,用同一个输入,两个模型输出的结果不一致该怎么办呢?torch.onnx.export中的参数model应该是没有问题的,会是因为其他参数吗?
onnx转pb模型的时候,报这个错误:
Traceback (most recent call last):
File "onnx2pb.py", line 45, in
onnx2pb_2(onnx_input_path)
File "onnx2pb.py", line 14, in onnx2pb_2
tf_rep = prepare(model)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/backend.py", line 66, in prepare
return cls.onnx_model_to_tensorflow_rep(model, strict)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/backend.py", line 86, in onnx_model_to_tensorflow_rep
return cls._onnx_graph_to_tensorflow_rep(model.graph, opset_import, strict)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/backend.py", line 147, in _onnx_graph_to_tensorflow_rep
strict=strict)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/backend.py", line 252, in _onnx_node_to_tensorflow_op
return handler.handle(node, tensor_dict=tensor_dict, strict=strict)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/handlers/handler.py", line 59, in handle
cls.args_check(node, **kwargs)
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/handlers/backend/resize.py", line 89, in args_check
"Tensorflow")
File "/home/fffan/下载/onnx-tensorflow-rel-1.6.0/onnx_tf/common/exception.py", line 49, in call
raise self._func(self.get_message(op, framework))
RuntimeError: Resize coordinate_transformation_mode=pytorch_half_pixel is not supported in Tensorflow.
请问这个问题该怎么解决啊
@cinastanbean
thanks for your great job,but i can't find the model_best_checkpoint_resnet18.pth.tar ,it's different with it,can you post this weights,looking for your replay,thanks very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.