sherjilozair / dqn

Basic DQN implementation
MIT License
217 stars 72 forks source link

Does not work with Tensorflow #8

Open Sohojoe opened 8 years ago

Sohojoe commented 8 years ago

I get the following error when running with TensorFlow (with GPU)

current context was not created by the StreamExecutor cuda_driver API: 0x2ccf300; a CUDA runtime call was likely performed without using a StreamExecutor context

Issue is that the code is referencing Theano directly:- from theano.gradient import disconnected_grad

reference:- https://github.com/tensorflow/tensorflow/issues/916

sherjilozair commented 8 years ago

it should be possible to use tf.stop_gradient to do this. However, this change should ideally belong to Keras backend, so that the DQN code becomes backend-agnostic.

calclavia commented 7 years ago

Use K.stop_gradient?