Skip to content

Translating TF or PyTorch or other code to returnn_common

Albert Zeyer edited this page Sep 6, 2022 · 2 revisions
  • tf.shape(x)[axis] -> nn.length(axis) (where axis is nn.Dim) (but not necessarily returning a scalar) or nn.dim_value(axis)

Also see the small RETURNN migration guide and RETURNN common conventions.

Clone this wiki locally