-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I am trying to import a model for use with torcheia. I am using the following code:
import torch
def model_fn():
model = torch.jit.load("cos_1.5.1.pt", map_location=torch.device('cpu'))
if torch.__version__ == '1.5.1':
import torcheia
model = model.eval()
model = torcheia.jit.attach_eia(model, 0)
return model
model = model_fn()
This is resulting in the following error: RuntimeError: class '__torch__.torch.nn.modules.conv.___torch_mangle_1.Conv2d' already defined.
Full traceback as follows:
Traceback (most recent call last):
File "main.py", line 50, in <module>
model = model_fn()
File "main.py", line 15, in model_fn
model = torcheia.jit.attach_eia(model, 0)
File "/home/ubuntu/.pyenv/versions/eia-testing/lib/python3.6/site-packages/torcheia/jit/__init__.py", line 5, in attach_eia
newobj = _torch_eia._tag_eia_device(obj._c, device)
RuntimeError: class '__torch__.torch.nn.modules.conv.___torch_mangle_1.Conv2d' already defined.
Since the error is occuring within the compiled files I have no way of investigating further.
Metadata
Metadata
Assignees
Labels
No labels