Freezing parameters: The power weight without updating may still change the active state
Freezing parameters usually mean that they are not updated for their calculations or given to the optimist, but there may be other states in the module.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Explanation of freezing parameters: mechanisms and premises that may still change the status quo without updating the weights
- Positioning the mechanism ' s fault limits with fixed examples
Suggested first
- Parameter gradient and module training module
Issues and mechanisms
Freezing parameters usually mean that they are not updated for their calculations or given to the optimist, but there may be other states in the module. Normalization statistics under the training model, random discards and caches may affect output. The constant weighting of the base is not sufficient to demonstrate that the bottom behaviour is fully fixed and that the appropriate training requires the management of parameters, models and status, respectively.
Trainingable parameters should be listed and the optimiser parameters should be set, confirming that the frozen object is not updated; Check again how the training and reasoning model works on the freeze module. Closes the guidance search record and sets the assessment mode differently and cannot be replaced by one another. Some paths, even if their parameters are frozen, still need to spread the gradient to upstream training input or adaptor, and the arbitrary disconnection of the entire calculation will disrupt learning.
A concrete example
Synthetic networks have frozen linear base and training adapters. If the linear weight is constant and the fitr input is discarded randomly, the same input may still vary in the forward direction; If the base contains running mean values, the training process may also change them. The parameters before and after the update can be saved and the enduring buffers are compared separately; Checking a weight of weight alone leaves a change in status.
Borders and checks
The refrozen parameters also need to be unfrozen to determine whether the optimists contain them, how the learning rate and the momentum are initialized. The parameter requires_grad is genuine but not in the optimizer and is not updated as expected. Numerical verification should be performed in fixed input, fixed mode, and then randomity separately; Two differentials cannot be discarded during training to determine whether the weight is being updated.
A method of verification
Freezing can be verified in three steps: first, by comparing the number sections or values, then lasting buffer, and then by comparing the output under a fixed assessment mode. Three answered different questions. If the new training layer is not registered in a general container, the overall training may still be operational but the optimist cannot see it; is verified from the list of named parameters. The first step after the unfrozen is also to see whether inappropriate movements have been wrongly repeated, especially when training is phased in, and the parameters ownership and optimization should be managed together.
Check understanding
Is there no gradient the same as eval?
No, it's not. The context of the orientation is separated from the behaviour of the module, and the running statistics and random layers may still be in the training mode and require a visible check.
Can you cut the whole section forward after freezing the base?
Not necessarily. If the adaptor or upstream training indicates a need to receive a gradient through the base, the overall breakchart cuts off the necessary path, which should be determined on the basis of actual reliance.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.