Set various random seeds required to ensure reproducible results. The
seed value will establish a new random seed for R, Python, NumPy,
and TensorFlow. GPU computations and CPU parallelism will also be disabled by
1 2 3 4 5 6
A single value, interpreted as an integer
This function must be called at the very top of your script (i.e.
library(keras), etc.). Any
existing TensorFlow session is torn down via
This function takes all measures known to promote reproducible results from TensorFlow sessions, however it's possible that various individual TensorFlow features or dependent libraries escape its effects. If you encounter non-reproducible results please investigate the possible sources of the problem, contributions via pull request are very welcome!
Packages which need to be notified before and after the seed is set
can register for the "tensorflow.on_before_use_session" and
"tensorflow.on_use_session" hooks (see
setHook()) for additional
details on hooks).
TensorFlow session object, invisibly
By default the
disables GPU and CPU parallelism, since both can result in
non-deterministic execution patterns (see
https://stackoverflow.com/questions/42022950/). You can optionally enable
GPU or CPU parallelism by setting the
disable_parallel_cpu parameters to
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.