Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kinier88 opened this issue Aug 27, 2024 · 1 comment
Open

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

kinier88 opened this issue Aug 27, 2024 · 1 comment

Comments

@kinier88
Copy link

一、转换代码如下:
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
Copy link
Owner

hzwer commented Aug 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants