osl_dynamics.inference.schedules.gumbel_temperature#
- osl_dynamics.inference.schedules.gumbel_temperature(epoch, *, curve, initial_temperature, final_temperature, slope, n_epochs)#
Temperature of a Gumbel-Softmax distribution.
- Parameters:
- epochint
Epoch.
- curvestr
'linear'decreases the temperature linearly from the initial to the final value overn_epochs.'exp'givesmax(final_temperature, initial_temperature * exp(-slope * epoch)).- initial_temperaturefloat
Temperature in the first epoch.
- final_temperaturefloat
Final temperature.
- slopefloat
Slope of the
'exp'curve.- n_epochsint
Number of epochs over which the
'linear'curve decreases.
- Returns:
- temperaturefloat