Skip to content

Are you sure .train() puts batch norm in eval mode? I'd assume that means train... #23

Description

@brando90

# Fix batch norm running statistics (i.e., put batch_norm layers in eval mode)

        # Fix batch norm running statistics (i.e., put batch_norm layers in eval mode)
        self.model.train()

is this truly correct?

.train() usually puts layers in training mode. So for batch norm what it means is that it start collecting running statistics but uses mini-batch stats if I remember correctly, while in .eval() it uses the saved running stats. Right?

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