Optimizing Trainable Parameters
To add support for a new type of gradient-based parameter update, create a new type with the following methods deifned for the types of generative functions that are to be supported.
Gen.init_update_state
โ Function.state = init_update_state(conf, gen_fn::GenerativeFunction, param_list::Vector)
Get the initial state for a parameter update to the given parameters of the given generative function.
param_list
is a vector of references to parameters of gen_fn
. conf
configures the update.
Gen.apply_update!
โ Function.apply_update!(state)
Apply one parameter update, mutating the values of the trainable parameters, and possibly also the given state.