Conversation
|
Please add a unit test |
trevor-m
left a comment
There was a problem hiding this comment.
Thanks @codeislife99 ! It looks good to me, but could you also add a test case in test_op_level2.py?
|
Added relevant test cases. |
|
@anijain2305 @trevor-m Does anyone have any idea of how to solve this ? Should we display a warning whenever we encounter negative padding ? |
There was a problem hiding this comment.
When handling the dynamic shape, you need to improve the shape function to check if the shape after padding is still legal on the fly. If it cannot be simply covered in this PR, we can focus on the static shape first and still throw out errors for negative padding values when the shape is dynamic.
|
Thanks @codeislife99 @comaniac @trevor-m This is merged |
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
Negative pad values error out currently. This PR removes it and handles the error correctly for negative pad values.