[HELP!] i can set seed on google colab + tf.Keras

I tried use the FAQ:

doing this way:

import numpy as np
import tensorflow as tf
import os
import random as rn

os.environ[‘PYTHONHASHSEED’] = ‘0’
np.random.seed(123)
rn.seed(123)
tf.random.set_seed(1234)

but sinply dont work
i using to make a RNN LSTM

pls Help!

1 Like

This is likely because of the non-deterministic CUDA kernels being fired at the backend. You can use the tensorflow-determinism tool from NVIDIA to fix this.

Here’s a guide that takes a deep dive into good reproducibility practices in TensorFlow.

4 Likes

Thank you…
I will try it!

1 Like