-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use user defined device choice during prepare model (#726)
1. Added sys_config.device and set it to user defined device choice "CUDA" or "CPU" in prepare and run_node 2. Updated conv_mixin.py to use sys_config.device and eliminate unnecessary transpose 3. Updated pool_mixin.py to eliminate the mandatory conversion of input x to channel last(NHWC) format. Added function to convert NHWC indices to NCHW indices for MaxPool_with_Argmax to fix issue #719 4. Updated unpool_mixin.py to eliminate the mandatory conversion of input x to channel last(NHWC) format 5. Updated dilated_pooling.py to process NCHW format input instead of NHWC format for all pooling operators, except MaxPool_with_Argmax and MaxPool_with_dilation_not_equal_to_1_and _spatial_size_equal_to_2. (tf.nn.maxpool_with_argmax and tf.nn.dilation2d only support NHWC format) 6. Added dynamic_shape test for Maxpool_with_Argmax 7. Set device in run_node for operators that behave differently in NCHW/NHWC format in test_node.py Signed-off-by: Winnie Tsang <[email protected]> Co-authored-by: Chin Huang <[email protected]>
- Loading branch information
1 parent
651c90f
commit c63d435
Showing
12 changed files
with
706 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.