Skip to content

container parameters #141

@glample

Description

@glample

Right now the parameters() function of nn.Container returns the parameters of the container children, but not the container itself. Problem comes from this line:

https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/container.py#L112

In python 3 this can simply be fixed with:

yield from super(Container, self).parameters(memo)

Or in python 2 or 3:

for p in super(Container, self).parameters(memo):
    yield p

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions