-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Vision] add test cases for flip, normalize, to_tensor #8919
Conversation
@@ -184,26 +184,26 @@ def forward(self, x): | |||
return image.imresize(x, *self._args) | |||
|
|||
|
|||
class RandomHorizontalFlip(HybridBlock): | |||
"""Randomly flip the input image horizontally with a probability | |||
class RandomLeftRightFlip(HybridBlock): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlipLeftRight?
f_expect, | ||
np.random.uniform(0, 255, (300, 300, 3)).astype(dtype=np.uint8)) | ||
|
||
def test_random_top_bottom_flip(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about run tests on non random versions (flip_left_right, adjust_xxx)
I'll add tests for brightness/contrast... once this pr is approved |
@@ -184,26 +184,44 @@ def forward(self, x): | |||
return image.imresize(x, *self._args) | |||
|
|||
|
|||
class RandomHorizontalFlip(HybridBlock): | |||
"""Randomly flip the input image horizontally with a probability | |||
class FlipLeftRight(HybridBlock): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this for now. It's unclear when you would want to always flip in a transform. We only need the functional implementation flip_left_right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Hello @Javelinjs, please rebase your PR. |
@marcoabreu You mean rebase from master? Is there anything related to these operators? |
Ah my bad, I didn't see you're merging into a different branch. Nevermind :) |
* [vision] ut for to_tensor, normalize, flip * [vision] fix flip * [vision] flip name * [vision] test non-random flip op * remove transform.FlipXXXX
* [vision] ut for to_tensor, normalize, flip * [vision] fix flip * [vision] flip name * [vision] test non-random flip op * remove transform.FlipXXXX
* [vision] ut for to_tensor, normalize, flip * [vision] fix flip * [vision] flip name * [vision] test non-random flip op * remove transform.FlipXXXX
* [vision] ut for to_tensor, normalize, flip * [vision] fix flip * [vision] flip name * [vision] test non-random flip op * remove transform.FlipXXXX
* [vision] ut for to_tensor, normalize, flip * [vision] fix flip * [vision] flip name * [vision] test non-random flip op * remove transform.FlipXXXX
#8556