keras-preprocessing icon indicating copy to clipboard operation
keras-preprocessing copied to clipboard

Add the missing seed argument for deterministic results.

Open ice-tong opened this issue 3 years ago • 0 comments

Summary

Add the missing seed argument to self.image_data_generator.get_random_transform for deterministic results. Especially during multi-thread, we cannot set numpy.rand.seed out of the thread, this argument pass is important!

Related Issues

None

PR Overview

  • [ ] This PR requires new unit tests [y/n] (make sure tests are included)
  • [ ] This PR requires to update the documentation [y/n] (make sure the docs are up-to-date)
  • [x] This PR is backwards compatible [y/n]
  • [ ] This PR changes the current API [y/n] (all API changes need to be approved by fchollet)

ice-tong avatar Jan 28 '22 06:01 ice-tong