这是indexloc提供的服务,不要输入任何密码
Skip to content

optimizer double update ? deprecation soon #395

@externalsupplierstaff

Description

@externalsupplierstaff
  • I have marked all applicable categories:
    • exception-raising bug
    • RL algorithm bug
    • documentation request (i.e. "X is missing from the documentation.")
    • new feature request
  • I have visited the source website
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and environment, where applicable:
    import tianshou, torch, numpy, sys
    print(tianshou.__version__, torch.__version__, numpy.__version__, sys.version, sys.platform)

Hey, I just want to say it may be needed a set() wrapping the list of params in

list(actor.parameters()) + list(critic.parameters()), lr=args.lr)

this is related to the warining

UserWarning: optimizer contains a parameter group with duplicate parameters; in future, this will cause an error; see github.com/pytorch/pytorch/issues/40967 for more information                                                                                     super(Adam, self).__init__(params, defaults)                                                    

The current version of the PPO test is updating some parameters twice, which could be the intended behavior but it won't be possible in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions