Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Support (C, 1, 1) for fill argument #306

Merged
merged 4 commits into from
Jul 3, 2017

Conversation

Hakuyume
Copy link
Member

No description provided.

@@ -24,6 +24,9 @@ def random_expand(img, max_ratio=4, fill=0, return_param=False):
paper, this value is 4.
fill (float, tuple or ~numpy.ndarray): The value of padded pixels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float or ~numpy.ndarray

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think supporting tuple is convenient. Why do you want to drop it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me summarize.

fill can be one of float, tuple or (C, 1, 1).
mean is (C, 1, 1).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fill can be one of float, tuple or (C, 1, 1).
mean is (C, 1, 1).

Yes. And I want to pass a tuple value that is never broadcasted to an image.

@@ -19,6 +19,9 @@ def resize_contain(img, size, fill=0, return_param=False):
size (tuple of two ints): A tuple of two elements:
:obj:`height, width`. The size of the image after resizing.
fill (float, tuple or ~numpy.ndarray): The value of padded pixels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@yuyu2172 yuyu2172 added this to the v0.6 milestone Jun 30, 2017
@yuyu2172
Copy link
Member

yuyu2172 commented Jul 3, 2017

LGTM

@yuyu2172 yuyu2172 merged commit 1422e24 into chainer:master Jul 3, 2017
@Hakuyume Hakuyume deleted the support-3-dimentional-fill branch July 3, 2017 07:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants