tensorflow image input format and means
ardiya opened this issue · 2 comments
ardiya commented
Hi @szagoruyko,
First of all thanks for converting the wide resnet model to tensorflow :)
I have some question about the details in WRN50 model:
- The Input image, is it RGB, BGR, or others? I saw the
inputs.permute(0,2,3,1)
and its kinda unintuitive. - What about image mean?
szagoruyko commented
@ardiya preprocessing is the same with torch:
- RGB
- mean / std normalization
you can find exact preprocessing here: https://github.com/szagoruyko/functional-zoo/blob/master/imagenet-validation.py#L69-L88
inputs.permute(0,2,3,1) is because input tensor is in NCHW in pytorch, and NHWC in tensorflow
ardiya commented
Ah, I see. Thank you very much