When we loop over the parameters we use,
for layer_name, param in net.named_parameters()
and the parameters are listed in the order they appear in the architecture. Is it possible to loop over these parameters in reverse order?
When we loop over the parameters we use,
for layer_name, param in net.named_parameters()
and the parameters are listed in the order they appear in the architecture. Is it possible to loop over these parameters in reverse order?
You can do this
for layer_name, param in reversed(list(net.named_parameters())):
print(layer_name)