BatchNorm1d‘s input is strange for me

If there is a 2d input, the second dimension represents Channel, it’s nature. But I cannot understand why is the same in 3d input?

# size:3*2 , 3 tensors, each have 2 channels

# size:2*3*2 , 2 batches, each batch contains 3 tensors, each have 2 channels
# why BatchNorm1d suggest the second dimension is channel dimension?

it is adapted for convolution networks, that use (Batch, Channels, *) convention, where * - 1-3 spatial dimensions.

Thanks. I am not familiar with CV. So I wanna confirm do you mean that for RGB piectures, which size equals batch*channel*height*width,the height*width is the spatial dimension?

yes, it is two spatial dimensions, usecase for 1d convolutions would be with time dimension.