dusty-nv / jetson-reinforcement

Deep reinforcement learning GPU libraries for NVIDIA Jetson TX1/TX2 with PyTorch, OpenAI Gym, and Gazebo robotics simulator.
MIT License
874 stars 225 forks source link

'Failed to load function from bytecode:' Error while loading model file #4

Closed ShreyasSkandan closed 7 years ago

ShreyasSkandan commented 7 years ago

Hi,

So i'm currently trying to load a network model via torch on an Nvidia TX1. When I try to load the model

net = torch.load('modelfile.t7','ascii')

I get the following error:

bytecode-error

The model loads fine on my Ubuntu 14.04 desktop, so I tried loading the same model, converting it to binary and then trying to load the converted file

net = torch.load('modelfile.bin')

But i still get a similar error:

binary_error_model

I've noticed that a few people have had the same errors in the past but most people seem to have been able to get past this by using an 'ascii' version of the model since it's platform independent (?). I seem to have had no luck with that. The other set of individuals who faced this problem were on a 32bit system. But my Nvidia TX1 is currently running on Ubuntu 16.04 (64bit).

For anyone willing to recreate these results:

I installed JetPack (JetPack-L4T-2.3.1-linux-x64.run) and verified that my installation of CUDA 8.0 and OpenCV is functional.

For Torch, I used your installation script https://github.com/dusty-nv/jetson-reinforcement The installation script in particular is https://github.com/dusty-nv/jetson-reinforcement/blob/master/CMakePreBuild.sh It all looks pretty straightforward.

And this is the code that i'm trying to run on the TX1 https://github.com/jzbontar/mc-cnn The model file in specific is https://s3.amazonaws.com/mc-cnn/net_kitti_fast_-a_train_all.t7

Any tips on how to fix this problem is gladly appreciated. If anyone has any ideas on how I can tweak the model on my desktop machine to make it work here I'd love to hear it too.

I know this doesn't sit perfectly well as an issue regarding this repository but I was hoping you'd have some idea on what might be causing this error.

Thanks in advance,

Shreyas

ShreyasSkandan commented 7 years ago

I figured out the cause of this problem and a suggested fix. You can refer to THIS POST for details.