Huyuwei commented on a change in pull request #5125: [KERAS]Upsample3d &
ZeroPadding3d op
URL: https://github.com/apache/incubator-tvm/pull/5125#discussion_r402460273
##########
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:
I also suggest adding a comment to make it clear that keras will send as 3
tuples of 2 ints in all three scenarios.
----------------------------------------------------------------
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