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
I'm trying to use thop on a module that is a loaded from file.
My code looks like this:
model = torch.jit.load(...)
x = ...
model(x) # this works
from thop import profile
profile(model, inputs=x) # this raises an exception
# RuntimeError: Can't add a new parameter after ScriptModule construction. Tried to add 'total_ops
What is happening - is it basically that the deserialized model is immutable and thop tries to modify it?
Is there a way around this?
Versions: thop 0.1.1 from pip, torch 1.13.0 and python 3.10.12 from conda
The text was updated successfully, but these errors were encountered:
I'm trying to use thop on a module that is a loaded from file.
My code looks like this:
What is happening - is it basically that the deserialized model is immutable and thop tries to modify it?
Is there a way around this?
Versions: thop 0.1.1 from pip, torch 1.13.0 and python 3.10.12 from conda
The text was updated successfully, but these errors were encountered: