Giter VIP home page Giter VIP logo

nikhilbarhate99 / min-decision-transformer Goto Github PK

View Code? Open in Web Editor NEW
242.0 242.0 24.0 21.56 MB

Minimal implementation of Decision Transformer: Reinforcement Learning via Sequence Modeling in PyTorch for mujoco control tasks in OpenAI gym

License: MIT License

Python 100.00%
deep-learning deep-reinforcement-learning machine-learning mujoco offline-reinforcement-learning openai-gym pytorch pytorch-transformers reinforcement-learning robotics transformer

min-decision-transformer's Introduction

Hi there πŸ‘‹

min-decision-transformer's People

Contributors

nikhilbarhate99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

min-decision-transformer's Issues

Training is ok, but failed to eval.

HelloπŸ‘‹,

Thank you for open-sourcing the code for the min decision transformer. Your code has been tremendously helpful in helping me understand DT.

However, I am currently facing an issue. During the training process, the action loss is indeed steadily decreasing, but the test results have consistently been subpar, to the point of having no discernible impact. I've been grappling with this problem for a while now and can't seem to figure out why this is happening.
ζˆͺ屏2023-10-09 16 12

By the way, I haven't tested it on the three environments, namely halfcheetah, hopper, and walker2d, mainly because I've been struggling with configuring d4rl. I'm using the upgraded version of d4rl provided by Farama, specifically on the pointmaze offline dataset.

If you could spare some time to assist me with this, I would be immensely grateful!

The position of `dropout` operation are different from official repo ?

In official repo, Attention part:
`

    w = nn.Softmax(dim=-1)(w)
    w = self.attn_dropout(w)
    # Mask heads if we want to
    if head_mask is not None:
        w = w * head_mask

    outputs = [torch.matmul(w, v)]`

The dropout is directly after the Softmax and before the matmul.

On the other hand, in our implement:
`

    normalized_weights = F.softmax(weights, dim=-1)
    # attention (B, N, T, D)
    # normalized_weights.shape: (B, N, T, T)
    # v.shape: (B, N, T, D)
    attention = self.att_drop(normalized_weights @ v)`

The dropout is at last.

In my opinion, they are different. How do you think about it? :-)

The calculation of state_mean and state_std in d4rl_info.py

Hello there, we are currently trying to use the code to give some other dataset a go, like walker2d-random-v2. So we would like to kindly ask how state_mean and state_std in d4rl_info are calculated, or whether there is any open data for these values. Thank you very much!

oscillations of eval score

Hi nik!

I have trained the walker2d and other environments several times. The settings and hyper parameters are all followed by original DT. And I found some strange points. Most of the environments, DT has the best score when the training steps between 10000 and 20000, and no obvious increase after 20000 steps.Sometimes, a trough also happened during that period. Would you mind give me some clues about these things?
walker2d_50

Debugging a custom gym environment

Hey,
I am trying to train this on my custom gym environment but the model isn't learning at all. Any idea what could be the probable cause?

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.