Apologies, it’s image_tens, not image.tens, edited my response.
Also, it depends on the ordering of the dimensions. If your image shape is [channels, width, height], then you should take mean over axes 0,2,3 since 1 is channels.