optima2005 commented on a change in pull request #4551: [Relay] add max_pool3d
in relay and TF converter
URL: https://github.com/apache/incubator-tvm/pull/4551#discussion_r360630617
##########
File path: tests/python/frontend/tensorflow/test_forward.py
##########
@@ -237,16 +237,43 @@ def _test_pooling_iteration(input_shape, **kwargs):
def _test_pooling(input_shape, **kwargs):
_test_pooling_iteration(input_shape, **kwargs)
- if is_gpu_available() and (len(input_shape) == 4):
- input_shape = [input_shape[ii] for ii in (0, 3, 1, 2)]
- kwargs['data_format'] = 'NCHW'
- _test_pooling_iteration(input_shape, **kwargs)
+ if is_gpu_available():
+ if len(input_shape) == 4:
+ input_shape = [input_shape[ii] for ii in (0, 3, 1, 2)]
+ kwargs['data_format'] = 'NCHW'
+ _test_pooling_iteration(input_shape, **kwargs)
+ elif len(input_shape) == 5:
+ input_shape = [input_shape[ii] for ii in (0, 4, 1, 2, 3)]
+ kwargs['data_format'] = 'NCDHW'
Review comment:
kwargs['data_format'] should be input parameter to cover "NDHWC" layout.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services