sergionr2 / RacingRobot

Autonomous Racing Robot With an Arduino, a Raspberry Pi and a Pi Camera
https://medium.com/@araffin/autonomous-racing-robot-with-an-arduino-a-raspberry-pi-and-a-pi-camera-3e72819e1e63
MIT License
222 stars 90 forks source link

Pytorch Error with Preinstalled Ubuntu Image #10

Open Joshua-Breedy opened 5 years ago

Joshua-Breedy commented 5 years ago

Hello! First off, thank you for sharing such an amazing resource for others to replicate. I saw your racing robot project featured on Medium and I want to replicate it for my own end-of-year project.

Currently, my team and I are stuck on an error that occurs when we try to run the main.py file. We used the preinstalled image that you provided but we noticed that the project had been updated, so we updated the project folder in the image as well. When we attempt to run it however, we receive this:

Attribute Error: ‘module’ object has no attribute ‘_rebuild_tensor_v2’

When we did more digging we realized it was a pytorch error. My question is do you know how to resolve the issue via pytorch update or is a new image required?

Our hardware is:

araffin commented 5 years ago

Attribute Error: ‘module’ object has no attribute ‘_rebuild_tensor_v2’

This image is maybe a bit old now. Can you check which version of pytorch is installed ?

Apparently, this is because the saved model was trained with an older version of pytorch. See issue in the pytorch forum. So a way to fix it is to retrain a model with a newer version of pytorch.

Joshua-Breedy commented 5 years ago

I checked the pytorch version and it came out as: 0.4.0a0+b23fa21