Change loss function depending on the iteration count within Optim.jl

For Gumbel Softmax there is a temperature parameter which is gradually reduced during training.

But in general, my loss function needs to be changed during training to push my solution towards a favorable state.