toshikwa / discor.pytorch Goto Github PK
View Code? Open in Web Editor NEWPyTorch implementation of Distribution Correction(DisCor) based on Soft Actor-Critic.
License: MIT License
PyTorch implementation of Distribution Correction(DisCor) based on Soft Actor-Critic.
License: MIT License
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!
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.