You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
Current benchmark is based on an assumption that input data are always in NHWC format (via tf.image), so when the model is asked to train models in NCHW format, it always firstly transposes the input from NHWC to NCHW.
However, if the input image is of NCHW format directly, we have no other choice but to transpose it into NHWC and then transposed back by the benchmark model, which is bad in performance and memory occupation, and if we let the script to train the input data in NHWC format, the script will no longer transpose the input data, but the model will misunderstand the image format and process the input data in NHWC-based conv2d and maxpooling2d.
So the solution is to handle input data_format carefully to avoid this problem, and I can make a PR to enhance this, is it OK?
The text was updated successfully, but these errors were encountered:
ghostplant
changed the title
Benchmark should support NCHW input without NCHW training transpose twice
Benchmark should support NCHW input directly without transpose them twice
Nov 10, 2018
Current benchmark is based on an assumption that input data are always in NHWC format (via tf.image), so when the model is asked to train models in NCHW format, it always firstly transposes the input from NHWC to NCHW.
However, if the input image is of NCHW format directly, we have no other choice but to transpose it into NHWC and then transposed back by the benchmark model, which is bad in performance and memory occupation, and if we let the script to train the input data in NHWC format, the script will no longer transpose the input data, but the model will misunderstand the image format and process the input data in NHWC-based conv2d and maxpooling2d.
So the solution is to handle input data_format carefully to avoid this problem, and I can make a PR to enhance this, is it OK?
The text was updated successfully, but these errors were encountered: