5 references to Reduction
Microsoft.ML.TorchSharp (5)
NasBert\NasBertTrainer.cs (3)
295loss = torch.nn.CrossEntropyLoss(reduction: Parent.BertOptions.Reduction).forward(logits, targetsTensor); 300loss = torch.nn.CrossEntropyLoss(reduction: Parent.BertOptions.Reduction).forward(logits, targetsTensor); 304loss = torch.nn.MSELoss(reduction: Parent.BertOptions.Reduction).forward(logits.squeeze(), targetsTensor);
Roberta\QATrainer.cs (2)
364torch.Tensor lossStart = torch.nn.CrossEntropyLoss(reduction: Parent.Option.Reduction).forward(startLogits, startTargets); 365torch.Tensor lossEnd = torch.nn.CrossEntropyLoss(reduction: Parent.Option.Reduction).forward(endLogits, endTargets);