TF order aka 'channel-last'
x = x[:, :, :, ::-1]
Zero-center by mean pixel
x[:, 0, :, :] -= 93.5940
x[:, 1, :, :] -= 104.7624
x[:, 2, :, :] -= 129.1863
the last three rows shouldn't be the following?:
x[:, : , :, 0] -= 93.5940
x[:, : , :, 1] -= 104.7624
x[:, : , :, 2] -= 129.1863
it makes no sense to do zero-center for the first three rows of an image.
TF order aka 'channel-last' x = x[:, :, :, ::-1] Zero-center by mean pixel x[:, 0, :, :] -= 93.5940 x[:, 1, :, :] -= 104.7624 x[:, 2, :, :] -= 129.1863
the last three rows shouldn't be the following?: x[:, : , :, 0] -= 93.5940 x[:, : , :, 1] -= 104.7624 x[:, : , :, 2] -= 129.1863 it makes no sense to do zero-center for the first three rows of an image.