Keras 固定随机种子


import tensorflow as tf
import random
import numpy as np

seed_value = 9527

random.seed(seed_value)
np.random.seed(seed_value)
tf.random.set_seed(seed_value)