seyeeet:

nn.InstanceNorm1d(in_channels, track_running_stats=False)


It’s when you pass the (non-default) track_running_stats=True that you get an error.
The normalization should be over the last dimension, so
m(embedding1).mean(-1), m(embedding1).std(-1, unbiased=False) gives values very close to 0 and 1.
Best regards
Thomas