looooongChen / tfAugmentor

An image augmentation library for tensorflow. It can be used seamlessly with tf.data.Dataset
MIT License
6 stars 1 forks source link

switch to `stateless_random_*` and `stateless_uniform` #2

Open Leterax opened 1 year ago

Leterax commented 1 year ago

Warning: The old RNGs from TF 1.x such as tf.random.uniform and tf.random.normal are not yet deprecated but strongly discouraged.

source: https://www.tensorflow.org/guide/random_numbers

You should probably switch to the new api, however, this adds a bit of complexity because we have to handle seeds ourselves.

Leterax commented 1 year ago

I saw tf.image.random_* image operations aren't used anywhere so I only replaced the tf.random.uniform calls. check out PR #3