mindformers.core¶
MindFormers Core.
mindformers.core¶
Clips tensor values by the ratio of the sum of their norms. |
|
Build context. |
|
Context initialization for MindSpore. |
mindformers.core.callback¶
Checkpoint Monitor For Save LossScale |
|
Loss Monitor for classification. |
|
Obs Monitor For AICC and Local |
|
Summary Monitor For AICC and Local |
|
Profile analysis in training. |
|
Evaluate Callback used in training progress. |
mindformers.core.loss¶
Calculate the cross entropy loss. |
|
L1Loss for parallel. |
|
MSELoss for parallel. |
|
SoftTargetCrossEntropy for MixUp Augment. |
mindformers.core.lr¶
ConstantWarmUpLR. |
|
CosineWithRestartsAndWarmUpLR. |
|
CosineWithWarmUpLR. |
|
LinearWithWarmUpLR. |
|
PolynomialWithWarmUpLR. |
mindformers.core.metric¶
Compute the f1, precision and recall score of each entity |
|
Compute the f1, precision and recall score of each entity |
|
Compute the loss and PPL of each entity |
|
Compute the f1, precision and recall score of each entity |
mindformers.core.optim¶
Implements the Adam algorithm to fix the weight decay. |
|
This class is almost same with the mindspore's AdamWeightDecay implements, the |