deeplabcut.pose_estimation_pytorch.models.weight_init
Ways to initialize weights for PyTorch modules.
Classes:
| Name | Description |
|---|---|
BaseWeightInitializer |
Class to used to initialize model weights. |
Dekr |
Class to used to initialize model weights in the same way as DEKR. |
Normal |
Class to used to initialize model weights using a normal distribution. |
Rtmpose |
Class to used to initialize head weights in the same way as RTMPose. |
BaseWeightInitializer
Bases: ABC
Class to used to initialize model weights.
Methods:
| Name | Description |
|---|---|
init_weights |
Initializes weights for a model. |
Source code in deeplabcut/pose_estimation_pytorch/models/weight_init.py
init_weights
abstractmethod
Initializes weights for a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Module
|
The model for which to initialize weights |
required |
Dekr
Bases: BaseWeightInitializer
Class to used to initialize model weights in the same way as DEKR.
Attributes:
| Name | Type | Description |
|---|---|---|
std |
the standard deviation to use to initialize weights |
Source code in deeplabcut/pose_estimation_pytorch/models/weight_init.py
Normal
Bases: BaseWeightInitializer
Class to used to initialize model weights using a normal distribution.
Weights are initialized with a normal distribution, and biases are initialized to 0.
Attributes:
| Name | Type | Description |
|---|---|---|
std |
the standard deviation to use to initialize weights |
Source code in deeplabcut/pose_estimation_pytorch/models/weight_init.py
Rtmpose
Bases: BaseWeightInitializer
Class to used to initialize head weights in the same way as RTMPose.