Skip to content

nn.Container.add_module: should return self, and name optional #31

@adamlerer

Description

@adamlerer

A common pattern in Lua torch is:

nn.Sequential().add_module(m1).add_module(m2)

Can we support this?

Also it would be nice if I didn't have to make up a name every time, can it be an optional second argument?

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