Learn R Programming

autotab (version 0.1.3)

reset_seeds: Reset all random seeds across R, TensorFlow, and Python

Description

Ensures reproducibility by synchronizing random seeds across:

  • R's random number generator (set.seed()),

  • TensorFlow's random state (tf$random$set_seed()),

  • Python's built-in random module.

Usage

reset_seeds(spec_seed)

Value

No return value but will print a confirmation message.

Arguments

spec_seed

Integer. The seed value to apply across R, TensorFlow, and Python.

Details

This also clears the current Keras/TensorFlow graph and session before reseeding, preventing residual state from prior model builds.

  • This function is not called automatically within AutoTab. Use it before training runs for reproducibility.

  • Equivalent results still require identical environments (same TensorFlow, CUDA/cuDNN, and library versions).

See Also

VAE_train(), set_feat_dist()

Examples

Run this code
# \donttest{
if (reticulate::py_module_available("tensorflow")) {
reset_seeds(1234)
}
# }


Run the code above in your browser using DataLab