Coder Social home page Coder Social logo

Comments (8)

ShangtongZhang avatar ShangtongZhang commented on August 22, 2024

Yes it's different. I remember you can set centered=True in PyTorch to make them the same. But I'm not sure.

Do you mean frame skip? It exists in atari wrapper.

from deeprl.

xfdywy avatar xfdywy commented on August 22, 2024

Not only frame skip. I mean during the training process, you don't have to calculate gradient and then do bp every step.

By the way, you don't implement any clip for gradient?

from deeprl.

ShangtongZhang avatar ShangtongZhang commented on August 22, 2024

I mean during the training process, you don't have to calculate gradient and then do bp every step.

I don't know this trick, do you know where it comes from?

By the way, you don't implement any clip for gradient?

In my understanding gradient clip is only necessary in multi-process setting

from deeprl.

xfdywy avatar xfdywy commented on August 22, 2024

update_freq=4 defined here
https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner/blob/1d52e98152fccd968d63ca67e33f5cbf3e83a878/run_gpu#L14

and used here
https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner/blob/1d52e98152fccd968d63ca67e33f5cbf3e83a878/dqn/NeuralQLearner.lua#L341

clip_delta=1
https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner/blob/1d52e98152fccd968d63ca67e33f5cbf3e83a878/run_gpu#L31

from deeprl.

ShangtongZhang avatar ShangtongZhang commented on August 22, 2024

Thanks, I haven't read the original lua code before.
It's interesting to know that tricks.

from deeprl.

xfdywy avatar xfdywy commented on August 22, 2024

Another issue................. In deepmind code, gradient clip is really "clip"

if self.clip_delta then
delta[delta:ge(self.clip_delta)] = self.clip_delta
delta[delta:le(-self.clip_delta)] = -self.clip_delta
end

But you use nn.utils.clip.grad_norm, which is more likely to do "normalization" .....
http://pytorch.org/docs/master/_modules/torch/nn/utils/clip_grad.html

from deeprl.

ShangtongZhang avatar ShangtongZhang commented on August 22, 2024

Yes .. I know that, just to conform with pytorch.

from deeprl.

xfdywy avatar xfdywy commented on August 22, 2024

Ok, thanks! So many details................

from deeprl.

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.