Closed YePG closed 2 years ago
In the python file label_smoothed_cross_entropy_with_contrastive.py def forward(self, model, sample, reduce=True): net_output = model(**sample["net_input"]) loss, nll_loss = self.compute_loss(model, net_output, sample, reduce=reduce) ....
Where is self.compute_loss( ) defined?
https://github.com/pytorch/fairseq/blob/master/fairseq/criterions/label_smoothed_cross_entropy.py#L109
In the python file label_smoothed_cross_entropy_with_contrastive.py def forward(self, model, sample, reduce=True): net_output = model(**sample["net_input"]) loss, nll_loss = self.compute_loss(model, net_output, sample, reduce=reduce) ....
Where is self.compute_loss( ) defined?