GithubHelp home page GithubHelp logo

toshikwa / discor.pytorch Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 6.0 39 KB

PyTorch implementation of Distribution Correction(DisCor) based on Soft Actor-Critic.

License: MIT License

Python 100.00%

discor.pytorch's People

Contributors

toshikwa 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

Watchers

 avatar  avatar  avatar

discor.pytorch's Issues

Size Mismatch

Hi,

I met a problem when I run the test.py
python test.py --cuda --render --env_id Walker2d-v2 --log_dir ~/discor.pytorch/logs/Walker2d-v2/discor-seed0-20210608-2206 /home/jiayao/anaconda3/envs/discor/lib/python3.8/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32 warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow')) Traceback (most recent call last): File "test.py", line 83, in <module> run(args) File "test.py", line 51, in run algo.load_models(os.path.join(args.log_dir, 'model', 'best')) File "/home/jiayao/discor.pytorch/discor/algorithm/eval.py", line 23, in load_models self._policy_net.load(os.path.join(save_dir, 'policy_net.pth')) File "/home/jiayao/discor.pytorch/discor/network.py", line 39, in load self.load_state_dict(torch.load(path)) File "/home/jiayao/anaconda3/envs/discor/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for GaussianPolicy: Missing key(s) in state_dict: "net.6.weight", "net.6.bias". size mismatch for net.4.weight: copying a param with shape torch.Size([12, 256]) from checkpoint, the shape in current model is torch.Size([256, 256]). size mismatch for net.4.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([256]).

Could you help me solve the problem? I would appreciate it.
Cheers!

Issue with training.

Hi,

When I run python train.py --cuda --env_id Walker2d-v2 --config config/mujoco.yaml --algo discor

I met the following errors:
/home/jiayao/anaconda3/envs/discor/lib/python3.8/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32 warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow')) Traceback (most recent call last): File "train.py", line 7, in <module> from discor.env import make_env File "/home/jiayao/discor.pytorch/discor/env.py", line 3, in <module> from metaworld.envs.mujoco.env_dict import ALL_ENVIRONMENTS ImportError: cannot import name 'ALL_ENVIRONMENTS' from 'metaworld.envs.mujoco.env_dict' (/home/jiayao/anaconda3/envs/discor/lib/python3.8/site-packages/metaworld/envs/mujoco/env_dict.py)

So I come to check env_dict.py and indeed there's no ALL_ENVIRONMENTS but ALL_V1_ENVIRONMENTS and ALL_V2_ENVIRONEMTS.

Could you help me solve this probelm. I would appreciate that.
Cheers!

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.