GithubHelp home page GithubHelp logo

khrylx / transform2act Goto Github PK

View Code? Open in Web Editor NEW
52.0 3.0 13.0 14.21 MB

[ICLR 2022 Oral] Official PyTorch Implementation of "Transform2Act: Learning a Transform-and-Control Policy for Efficient Agent Design".

Home Page: https://sites.google.com/view/transform2act

License: MIT License

Python 100.00%
reinforcement-learning agent-design robot-design iclr2022

transform2act's Issues

The configuration is correct,but the code cannot be trained normally.

hello,I'm having some troubles when trying to run this project.
the following is my hardware version and my configured environment.

NVIDIA Geforce RTX 3080Ti, and because it's a 30 series graphics card, the minimum CUDA can be used is CUDA11.

截图1

python=3.7.0,torch=1.8.0+cu111, torch.cuda is available.

截图2

torch-geometric=2.1.0 with correct CUDA and PyTorch versions and Mujoco_py=2.1 can successfully be imported.

图片
图片
截图6

when run python design_opt/train.py --cfg hopper --gpu 0

The program does not report errors, but also no response
截图3

log file is empty
截图4

the tensorboard interface also has no data.
截图5

Additionally,I have successfully executed it in the PYTORCH=1.8.0+CU102 version on another server before.
Is this project unable to use CUDA11.1 for training?

Some errors in the codes

  1. There is no create_dirs argument in Config class's init function.

    cfg = Config(args.cfg, args.tmp, create_dirs=not (args.render or args.epoch != '0'))

  2. When num_threads >= 2, the code gets stuck in the following line

    out[x_ind] = torch.addmm(b, x[x_ind], W.t())
    multiprocessing might be the reason. When num_threads=1 and Queue was not use, everything goes fine. I setup a conda environment as the instructions in README. Have you ever encountered this bug?

I cant use the pretrain model for the state_dict error

python design_opt/eval.py --cfg swimmer --save_video

loading model from checkpoint: results/swimmer/models/best.p
Traceback (most recent call last):
File "/home/dzyao/shiyuexin/shiyan/transform2act/design_opt/eval.py", line 28, in
agent = Transform2ActAgent(cfg=cfg, dtype=dtype, device=device, seed=cfg.seed, num_threads=1, training=False, checkpoint=epoch)
File "/home/dzyao/shiyuexin/shiyan/transform2act/design_opt/agents/transform2act_agent.py", line 38, in init
self.load_checkpoint(checkpoint)
File "/home/dzyao/shiyuexin/shiyan/transform2act/design_opt/agents/transform2act_agent.py", line 162, in load_checkpoint
self.policy_net.load_state_dict(model_cp['policy_dict'])
File "/home/dzyao/anaconda3/envs/pytorch2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Transform2ActPolicy:
Missing key(s) in state_dict: "skel_gnn.gconv_layers.0.lin_rel.weight", "skel_gnn.gconv_layers.0.lin_rel.bias", "skel_gnn.gconv_layers.0.lin_root.weight", "skel_gnn.gconv_layers.1.lin_rel.weight", "skel_gnn.gconv_layers.1.lin_rel.bias", "skel_gnn.gconv_layers.1.lin_root.weight", "skel_gnn.gconv_layers.2.lin_rel.weight", "skel_gnn.gconv_layers.2.lin_rel.bias", "skel_gnn.gconv_layers.2.lin_root.weight", "attr_gnn.gconv_layers.0.lin_rel.weight", "attr_gnn.gconv_layers.0.lin_rel.bias", "attr_gnn.gconv_layers.0.lin_root.weight", "attr_gnn.gconv_layers.1.lin_rel.weight", "attr_gnn.gconv_layers.1.lin_rel.bias", "attr_gnn.gconv_layers.1.lin_root.weight", "attr_gnn.gconv_layers.2.lin_rel.weight", "attr_gnn.gconv_layers.2.lin_rel.bias", "attr_gnn.gconv_layers.2.lin_root.weight", "control_gnn.gconv_layers.0.lin_rel.weight", "control_gnn.gconv_layers.0.lin_rel.bias", "control_gnn.gconv_layers.0.lin_root.weight", "control_gnn.gconv_layers.1.lin_rel.weight", "control_gnn.gconv_layers.1.lin_rel.bias", "control_gnn.gconv_layers.1.lin_root.weight", "control_gnn.gconv_layers.2.lin_rel.weight", "control_gnn.gconv_layers.2.lin_rel.bias", "control_gnn.gconv_layers.2.lin_root.weight".
Unexpected key(s) in state_dict: "skel_gnn.gconv_layers.0.lin_l.weight", "skel_gnn.gconv_layers.0.lin_l.bias", "skel_gnn.gconv_layers.0.lin_r.weight", "skel_gnn.gconv_layers.1.lin_l.weight", "skel_gnn.gconv_layers.1.lin_l.bias", "skel_gnn.gconv_layers.1.lin_r.weight", "skel_gnn.gconv_layers.2.lin_l.weight", "skel_gnn.gconv_layers.2.lin_l.bias", "skel_gnn.gconv_layers.2.lin_r.weight", "attr_gnn.gconv_layers.0.lin_l.weight", "attr_gnn.gconv_layers.0.lin_l.bias", "attr_gnn.gconv_layers.0.lin_r.weight", "attr_gnn.gconv_layers.1.lin_l.weight", "attr_gnn.gconv_layers.1.lin_l.bias", "attr_gnn.gconv_layers.1.lin_r.weight", "attr_gnn.gconv_layers.2.lin_l.weight", "attr_gnn.gconv_layers.2.lin_l.bias", "attr_gnn.gconv_layers.2.lin_r.weight", "control_gnn.gconv_layers.0.lin_l.weight", "control_gnn.gconv_layers.0.lin_l.bias", "control_gnn.gconv_layers.0.lin_r.weight", "control_gnn.gconv_layers.1.lin_l.weight", "control_gnn.gconv_layers.1.lin_l.bias", "control_gnn.gconv_layers.1.lin_r.weight", "control_gnn.gconv_layers.2.lin_l.weight", "control_gnn.gconv_layers.2.lin_l.bias", "control_gnn.gconv_layers.2.lin_r.weight".

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.