Skip to content

Normalize() transform has undocumented side effect #517

Closed
@keunhong

Description

@keunhong

It seems like F.normalize() does all of its operations in-place.

I feel like this should either be very clearly documented or be hidden behind a flag.

This really bit me when I was just sending some batch images to Visdom but my denormalization function was silently denormalizing my batch before doing a forward pass on the network. It was hidden to me until now and surfaces because a copy disappeared when I removed all Variable() wrappers.

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