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

Segmentation Fault - C++ wrapper - dqnAgent #22

Closed lfelipesv closed 6 years ago

lfelipesv commented 6 years ago

Hi Dusty,

First of all thanks for your repositories and tutorials that are really helpful.

I am trying to build this repo on my ubuntu 16.04, Cuda 9.0, Cudnn 7, gcc 5.4...

I can run the pytorch examples successfully, but when i try to run the catch, fruit and gazebo-arm executables, in all of them I get Segmentation Fault (core dumped).

It seems to be on the following line:

// Create reinforcement learner agent in pyTorch using API
dqnAgent* agent = dqnAgent::Create(gameWidth, gameHeight, NUM_CHANNELS, NUM_ACTIONS, 
                                OPTIMIZER, LEARNING_RATE, REPLAY_MEMORY, BATCH_SIZE, 
                                GAMMA, EPS_START, EPS_END, EPS_DECAY, 
                                USE_LSTM, LSTM_SIZE, ALLOW_RANDOM, DEBUG_DQN);

I tracked down the error until the following line (pyTensor.cpp):

t->pyTensorCPU = THPFloatTensor_New(t->cpuTensor);

I am using pytorch '0.3.0.post4'.

Any tips on what can be the reason?

Thank you very much!

Felipe.

lfelipesv commented 6 years ago

Solved: changed to CUDA 8.0 and CuDNN 6.0, compiled again and it worked.

brunoeducsantos commented 4 years ago

Hey @lfelipesv How did you downgrade your cuda version in jetsont tx2? Thanks