Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option support for native NCHW input data format. #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghostplant
Copy link

Fixing the issue: #267

Note: If not specifying --input_data_format=NCHW manually, all existing logic keeps unchanged.

@reedwm
Copy link
Member

reedwm commented Nov 16, 2018

Can you clarify what this PR does? With --input_data_format, you move the transpose logic to another part of the code, but you still do the transpose.

@ghostplant
Copy link
Author

@reedwm Hi, it is a good question. Because it is possible to generate the input in NCHW format directly such as dataset.from_tensor/from_generator and other kind of pre-processed data, which would be faster during training and inference in terms of performance and it also costs less GPU memory and also CPU memory since we no longer need a useless format conversion.
For this commit, it allows the model to accept NCHW input format without twice time of format conversion on GPU(or CPU), and in the future I could add the case of feeding NCHW input data for this case once it is accepted. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants