Open kinier88 opened 3 months ago
一、转换代码如下: onnx_path = 'flownet.onnx' dummy_input = torch.randn(1, 6, 256, 448).to(device) torch.onnx.export(self.flownet, dummy_input, onnx_path, export_params=True, opset_version=16, do_constant_folding=True, input_names = ['input'], output_names = ['output'], ) print(f'Model has been exported to {onnx_path}')
onnx_model = onnx.load(onnx_path) tf_rep = prepare(onnx_model) tf_rep.export_graph("flownet.pb") ## 加载 SavedModel model = tf.saved_model.load("flownet.pb")
二、报错如下: BackendIsNotSupposedToImplementIt: LeakyRelu version 16 is not implemented.
如果opset_version设置11则提示grid_sample要opset_version 16
或者请问下能不能提供Tf或者tflite的预训练模型?
I have no relevant skills ... 完全不懂
一、转换代码如下: onnx_path = 'flownet.onnx'
dummy_input = torch.randn(1, 6, 256, 448).to(device) torch.onnx.export(self.flownet, dummy_input, onnx_path, export_params=True, opset_version=16, do_constant_folding=True, input_names = ['input'], output_names = ['output'], ) print(f'Model has been exported to {onnx_path}')
二、报错如下: BackendIsNotSupposedToImplementIt: LeakyRelu version 16 is not implemented.
如果opset_version设置11则提示grid_sample要opset_version 16
或者请问下能不能提供Tf或者tflite的预训练模型?