Function mindspore::dataset::config::set_seed

Function Documentation

bool mindspore::dataset::config::set_seed(int32_t seed)

A function to set the seed to be used in any random generator. This is used to produce deterministic results.

Parameters

seed[in] The default seed to be used.

Returns

The seed is set successfully or not.

样例
// Set a new global configuration value for the seed value.
// Operations with randomness will use the seed value to generate random values.
bool rc = config::set_seed(5);