-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems loading torchscript #795
Comments
@davave are you sure it's a torchscript script and not a pytorch model? |
Thank you @gkorland.
I am not really sure as i am quite a newbie with this tools, but I looked around and found that there are two different ways to create a torchscript script from a pytorch model: jit.trace and jit.script. I chose to use the former since it was the one proposed by the authors and I did not have a complete knowledge of the model.
When I run: with open('./weights.torchscript.pt', 'rb') as f:
model = f.read()
res = conn.execute_command('AI.MODELSET', 'yolo:model', 'TORCH', args.device, model) the result is
I also tried with AI.MODELSTORE but the result is the same |
Background
python version: 3.7.3
pytorch version: 1.8.1
torchvision version: 0.9.1
Issue
I'm trying to run a torchscript model from Ultralytics/YoloV5 in RedisAI using python.
I exported the model using export.py:
and the file weights.torchscript.pt is generated. When I try to run
the following error appears:
Could anyone help me please? I am starting to use redisAI into the redisedge framework but I can't figure out whether the problem is in torchscript export, in the redisAI loading, or I am missing something important.
Thank you!
The text was updated successfully, but these errors were encountered: