Replies: 2 comments 3 replies
|
Just call before tracing |
1 reply
|
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? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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')
All reactions