718677ebb044e27aaf1a30640c2f7ab6b8fa8509,fairseq/criterions/masked_lm.py,MaskedLmLoss,forward,#MaskedLmLoss#Any#Any#Any#,25
Before Change
ignore_index=self.padding_idx,
)
sample_size = targets.ne(self.padding_idx).int().sum().item()
logging_output = {
"loss": utils.item(loss.data) if reduce else loss.data,
"nll_loss": utils.item(loss.data) if reduce else loss.data,
After Change
ignore_index=self.padding_idx,
)
sample_size = masked_tokens.int().sum().item()
logging_output = {
"loss": utils.item(loss.data) if reduce else loss.data,
"nll_loss": utils.item(loss.data) if reduce else loss.data,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: elbayadm/attn2d
Commit Name: 718677ebb044e27aaf1a30640c2f7ab6b8fa8509
Time: 2019-09-18
Author: namangoyal@learnfair0893.h2.fair
File Name: fairseq/criterions/masked_lm.py
Class Name: MaskedLmLoss
Method Name: forward
Project Name: arraiy/torchgeometry
Commit Name: b04e9c22a24716b440edeb92072e80c98976507e
Time: 2020-09-02
Author: sj8716643@126.com
File Name: kornia/geometry/transform/crop.py
Class Name:
Method Name: crop_by_boxes