Huyuwei commented on a change in pull request #5125: [KERAS]Upsample3d &
ZeroPadding3d op
URL: https://github.com/apache/incubator-tvm/pull/5125#discussion_r402459214
##########
File path: python/tvm/relay/frontend/keras.py
##########
@@ -663,6 +667,36 @@ def _convert_padding(inexpr, keras_layer, etab):
return _op.nn.pad(data=inexpr, pad_width=((0, 0), (0, 0), (top,
bottom), (left, right)))
return _op.nn.pad(data=inexpr, pad_width=((0, 0), (top, bottom), (left,
right), (0, 0)))
+def _convert_padding3d(inexpr, keras_layer, etab):
+ _check_data_format(keras_layer)
+ padding = keras_layer.padding
+
+ d_pad = h_pad = w_pad = {0, 0}
+ if isinstance(padding, tuple):
Review comment:
Thanks for the clarification. Then the two checks can be merged into one:
`if isinstance(padding, tuple) and isinstance(padding[0], tuple)`
----------------------------------------------------------------
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