This is my code segment in inference.py:
model = torch.load("checkpoints/model.ckpt")
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
model = model.to(device)
When I run sh test.sh I get this error:
Global seed set to 321
Traceback (most recent call last):
File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'
Global seed set to 5876
Traceback (most recent call last):
File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'
Global seed set to 5065
Traceback (most recent call last):
File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'
This is my code segment in inference.py: model = torch.load("checkpoints/model.ckpt")
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") model = model.to(device)
When I run sh test.sh I get this error: Global seed set to 321 Traceback (most recent call last): File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'
Global seed set to 5876
Traceback (most recent call last):
File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'
Global seed set to 5065
Traceback (most recent call last):
File "scripts/inference.py", line 410, in
main()
File "scripts/inference.py", line 279, in main
model = model.to(device)
AttributeError: 'dict' object has no attribute 'to'