Giter Site home page Giter Site logo

nikhilbarhate99 / hierarchical-actor-critic-hac-pytorch Goto Github PK

View Code? Open in Web Editor NEW
276.0 7.0 48.0 1.01 MB

PyTorch implementation of Hierarchical Actor Critic (HAC) for OpenAI gym environments

License: MIT License

Python 100.00%
pytorch reinforcement-learning reinforcement-learning-algorithms gym-environment hierarchical-reinforcement-learning actor-critic gym-environments openai-gym pytorch-implementation pytorch-rl

hierarchical-actor-critic-hac-pytorch's Issues

Reg. Getting Gradient Loss values while testing

Hi I want to get the gradient loss with respect to input while I am testing. I tried the following in HAC.py after the next_state, rew, done, _ = env.step(action) line in the low level policy:

state = torch.FloatTensor(state).to(device)
action = torch.FloatTensor(action).to(device)
goal = torch.FloatTensor(goal).to(device)
criticval = self.HAC[0].critic(state, action, goal).detach()

with plans of computing a new target_Q in the moment to calculate loss and then gradient. However, I get the error Dimension out of range (expected to be in range of [-1, 0], but got 1). Any reason why this is happening?

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.