Skip to content

How to implement batch norm #89

@albertz

Description

@albertz

There are a couple of open question regarding how to implement batch norm using the building blocks of returnn-common. Of course we could also wrap the existing BatchNormLayer in RETURNN (which needs rwth-i6/returnn#891 though) but even if this would be the implementation of BatchNorm in returnn-common, the question still remains how to implement it from scratch using the building blocks of returnn-common. In any case, this should be possible, and preferably also in a straight-forward way.

One question is, how to handle the the train flag. This is #18.

Another question is, how to do custom updates for the running statistic variables. This is #90.

Another question is, how to make use of the TF fused op, which would be important for efficiency. Specifically, tf.compat.v1.nn.fused_batch_norm with data_format="NCHW".

Related are also the batch norm defaults (#83) although not too relevant for the question on how to implement this.

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