hzwer / Practical-RIFE

More practical frame interpolation approach.
MIT License
625 stars 68 forks source link

转换RIFE模型到onnx再转换到tensorfow失败 #94

Open kinier88 opened 3 months ago

kinier88 commented 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的预训练模型?

hzwer commented 3 months ago

I have no relevant skills ... 完全不懂