Skip to content

add copy.deepcopy support to nn.Container models #415

@soumith

Description

@soumith

Right now, one has to do:

net = ...
state = net.state_dict()
state_clone = copy.deepcopy(state)
net2 = ...
net2.load_state_dict(state_clone)

Reported by @bharath272

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions