Git Product home page Git Product logo

Comments (8)

ppwwyyxx avatar ppwwyyxx commented on August 20, 2024

Looks like it's currently not using GPU efficiently #21

from dqn-tensorflow.

mthrok avatar mthrok commented on August 20, 2024

I ran some experiments a while ago, and observed the same thing.

In my experiments (I did not using this repo), everything other than underlying NN library were same, and mini-batch was fed to GPU in the same manner (send mini-batch every time network is updated.) and yet Theano was faster than Tensorflow.

According to #2919 #3377, Tensorflow's seesion.run method does things more than just feeding data to GPU. thus I guess that is adding overhead and making the training slower than Theano.

from dqn-tensorflow.

ppwwyyxx avatar ppwwyyxx commented on August 20, 2024

@mthrok The two issues are saying that feed_dict is slow (not session.run is slow). It's actually a good practice to avoid using feed_dict inside training loops to reduce overhead compared to other frameworks.

from dqn-tensorflow.

Lan1991Xu avatar Lan1991Xu commented on August 20, 2024

Has anyone solve the training slower problems? in my case, it almost 600hours training.

from dqn-tensorflow.

quhezheng avatar quhezheng commented on August 20, 2024

@ppwwyyxx So nice to see you here, Tensorpack author, why this repo's performance differ so much from your samples in tensorpack. I don't see major difference but this repo collect experince replay in the same thread with training. But does it matter? Or because you used ROM directly?

from dqn-tensorflow.

ppwwyyxx avatar ppwwyyxx commented on August 20, 2024

I don't know why. Maybe the use of feed_dict is the major reason.
Using thread improves speed but not significant in my case. Using rom should make no difference to speed.

from dqn-tensorflow.

quhezheng avatar quhezheng commented on August 20, 2024

@ppwwyyxx I failed to describe the issue clearly. The issue I run into this reop is the training best rewards is 30, no where to compare with the sample in your repo. I compared code but don't see major difference. I changed your sample by replacing ROM direcly with Gym, no code change with network or training, unfortunatly, the output from your code is as bad as this repo, the best reward simply 50 and doesn't make any progress any more after million steps.

So I guess the Gym envirement itself has bugs. But ROM is free of the issue, I though you were aware of this issue so you use ROM instead of Gym

from dqn-tensorflow.

ppwwyyxx avatar ppwwyyxx commented on August 20, 2024

It's not a bug. Gym environments (**-v0) is just a harder setting because it has more randomness. You can use other gym settings e.g. BreakoutDeterministic-v4 is closest to a naive atari wrapper.
However even with Breakout-v0, you should still be able to see better performance than 50.

from dqn-tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.