Skip to content

Parameter random init outside name ctx does not work #109

@albertz

Description

@albertz

This happens e.g. for

model = nn.Linear(out_dim, in_dim=in_dim)

outside a NameCtx.

Or maybe we want to disallow this? I.e. simply require that the model (all params) are always defined inside a NameCtx.

Or lazily assign the parent name ctx and the name itself later, similar as we do for Parameter?

PR in #108.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions