Replies: 2 comments 3 replies
-
Just call before tracing |
Beta Was this translation helpful? Give feedback.
-
I had an issue with this case as well. tho after using Just call before tracing model.encoder.set_swish(memory_efficient=False). I got this Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
I am trying to jit trace the unet model. But I get an error saying "Could not export Python function call 'SwishImplementation'. Remove calls to python functions before export." How can I export the model so I can use it in a c++ application.
model = smp.Unet('efficientnet-b7')
model.eval()
input = torch.randn((1,3,224,224))
torch_out = model(input)
model = torch.jit.trace(model,input)
trace_out = model(input)
model.save('model.pt')
Beta Was this translation helpful? Give feedback.
All reactions