You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importonnximporttorchfromresnetimportInceptionResnetV1torch_model=InceptionResnetV1('vggface2')
torch_model.eval()
torch_input=torch.randn(1, 3, 160, 160)
torch.onnx.export(torch_model, torch_input,
'facenet.onnx',
opset_version=18, # The ONNX version to export the model todo_constant_folding=True, # Whether to execute constant folding for optimizationinput_names=['input0'], # The model's input namesoutput_names=['output0'] # The model's output names
)
# Load the ONNX modelonnx_model=onnx.load('facenet.onnx')
# Check that the model is well-formedonnx.checker.check_model(onnx_model)
print("ONNX model is well-formed and saved successfully.")
Is it possible to convert MTCNN to ONNX?
The text was updated successfully, but these errors were encountered: