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

Add argument of alpha to MixUpSoftLabelDataset #836

Merged
merged 5 commits into from
Mar 19, 2019

Conversation

crcrpar
Copy link
Contributor

@crcrpar crcrpar commented Mar 17, 2019

Resolves #821.

@yuyu2172 yuyu2172 self-assigned this Mar 18, 2019
@yuyu2172 yuyu2172 added this to the 0.13 milestone Mar 18, 2019
@yuyu2172
Copy link
Member

yuyu2172 commented Mar 18, 2019

Thank you so much.
Could you add a test that uses alpha option?

@@ -55,16 +60,21 @@ class MixUpSoftLabelDataset(dataset_mixin.DatasetMixin):
.. [#mixup_1] Same as :obj:`dataset`.
"""

def __init__(self, dataset, n_class):
def __init__(self, dataset, n_class, alpha=1.0):
if alpha <= 0.0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: NumPy documentation says alpha is non-negative but it rejects alpha of 0 raising Value Error of a <= 0.

@yuyu2172
Copy link
Member

LGTM!

@yuyu2172
Copy link
Member

pfnCI, test this please

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit 304a71b:

@yuyu2172 yuyu2172 merged commit 706272b into chainer:master Mar 19, 2019
@crcrpar crcrpar deleted the improve-mixup branch March 19, 2019 02:03
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

3 participants