|
|
|
@ -107,7 +107,7 @@ class Momentum(Optimizer):
|
|
|
|
|
>>> group_params = [{'params': conv_params, 'weight_decay': 0.01},
|
|
|
|
|
>>> {'params': no_conv_params, 'lr': 0.01},
|
|
|
|
|
>>> {'order_params': net.trainable_params()}]
|
|
|
|
|
>>> opt = nn.Momentum(group_params, learning_rate=0.1, momentum=0.9, weight_decay=0.0)
|
|
|
|
|
>>> optim = nn.Momentum(group_params, learning_rate=0.1, momentum=0.9, weight_decay=0.0)
|
|
|
|
|
>>> # The conv_params's parameters will use a learning rate of default value 0.1 and a weight decay of 0.01.
|
|
|
|
|
>>> # The no_conv_params's parameters will use a learning rate of 0.01 and a weight decay of default value 0.0.
|
|
|
|
|
>>> # The final parameters order in which the optimizer will be followed is the value of 'order_params'.
|
|
|
|
|