Category: 13. RNG API

  • Random operations

    categorical function Draws samples from a categorical distribution. This function takes as input logits, a 2-D input tensor with shape (batch_size, num_classes). Each row of the input represents a categorical distribution, with each column index containing the log-probability for a given class. The function will output a 2-D tensor with shape (batch_size, num_samples), where each row contains…

  • SeedGenerator class

    SeedGenerator class Generates variable seeds upon each call to a RNG-using function. In Keras, all RNG-using methods (such as keras.random.normal()) are stateless, meaning that if you pass an integer seed to them (such as seed=42), they will return the same values at each call. In order to get different values at each call, you must use a SeedGenerator instead as…