How to lower the temperatur parameter during training?
This post (https://github.com/Microsoft/CNTK/wiki/Express-a-softmax-with-a-temperature-parameter)shows how to express a softmax with temperatur parameter in CNTK. Is there a way to decrease the temperatur over training time, i.e., with increasing number of epochs, similar to how the learning rate can be adjusted over training time?
I think the best way is to do it through a ndl file:
for example if a simple softmax layer is defined by:
SMFF(x, y, z, labels)
{
FF = FF(x, y, z)
SM = CrossEntropyWithSoftmax(labels, FF)
}
you can reduce softmax temperature by multiplying/dividing by a T factor, as bellow:
SMFF(x, y, z, T, labels)
{
FF = FF(x, y, z)
FF = FF .* T
SM = CrossEntropyWithSoftmax(labels, FF)
}
Thank you for your answer. Is there a way to also lower the T factor with each epoch? When I read your example correctly, the same temperatur (T factor) will be used for each epoch.
I don't know a straight way for doing that. You can achieve it by divide training phase into chunks each have an specific temperature. However this is not a good and reasonable solution and I'm curious to know better solutions...
Thank you for your suggestion. I think that approach can be reasonable for small numbers of different temperatures.