mmengine.model — mmengine 0.10.7 documentation (original) (raw)
mmengine.model
Module¶
Model¶
EMA¶
Model Wrapper¶
Weight Initialization¶
BaseInit | |
---|---|
Caffe2XavierInit | |
ConstantInit | Initialize module parameters with constant values. |
KaimingInit | Initialize module parameters with the values according to the method described in the paper below. |
NormalInit | Initialize module parameters with the values drawn from the normal distribution \(\mathcal{N}(\text{mean}, \text{std}^2)\). |
PretrainedInit | Initialize module by loading a pretrained model. |
TruncNormalInit | Initialize module parameters with the values drawn from the normal distribution \(\mathcal{N}(\text{mean}, \text{std}^2)\) with values outside \([a, b]\). |
UniformInit | Initialize module parameters with values drawn from the uniform distribution \(\mathcal{U}(a, b)\). |
XavierInit | Initialize module parameters with values according to the method described in the paper below. |
bias_init_with_prob | Initialize conv/fc bias value according to a given probability value. |
---|---|
caffe2_xavier_init | |
constant_init | |
initialize | Initialize a module. |
kaiming_init | |
normal_init | |
trunc_normal_init | |
uniform_init | |
update_init_info | Update the _params_init_info in the module if the value of parameters are changed. |
xavier_init |
Utils¶
detect_anomalous_params | |
---|---|
merge_dict | Merge all dictionaries into one dictionary. |
stack_batch | Stack multiple tensors to form a batch and pad the tensor to the max shape use the right bottom padding mode in these images. |
revert_sync_batchnorm | Helper function to convert all SyncBatchNorm (SyncBN) and mmcv.ops.sync_bn.SyncBatchNorm`(MMSyncBN) layers in the model to `BatchNormXd layers. |
convert_sync_batchnorm | Helper function to convert all BatchNorm layers in the model to SyncBatchNorm (SyncBN) or mmcv.ops.sync_bn.SyncBatchNorm (MMSyncBN) layers. |