Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random state argument for consistent random augmentations #47

Closed
Dale-Black opened this issue Jul 28, 2021 · 4 comments
Closed

Random state argument for consistent random augmentations #47

Dale-Black opened this issue Jul 28, 2021 · 4 comments

Comments

@Dale-Black
Copy link
Contributor

Dale-Black commented Jul 28, 2021

I would like to suggest an argument for RandomResizeCrop and other stochastic transformations. Something like RandomResizeCrop(seed=...) would be really convenient for augmenting supervised data with the same random seed. This isn't necessary obviously as you have already given me a helpful workaround, but in case this is easy to implement I wanted to add this suggestion

@lorenzoh
Copy link
Member

lorenzoh commented Jul 29, 2021

So you want to fix the randomness of a stochastic transformation so it always gives the same result? What would seed do exactly?

@Dale-Black
Copy link
Contributor Author

I was thinking something like this. But I’m not sure if this is much cleaner than the route you have already proposed actually

@lorenzoh
Copy link
Member

Hm, I don't really see an advantage in this. One thing to do could be to implement a wrapper transform Deterministic that wraps a transform and always passes the same random state through. That way you wouldn't need to change existing transforms.

@Dale-Black
Copy link
Contributor Author

Fair enough. I think I agree with you the more I think about it

@lorenzoh lorenzoh closed this as completed Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants