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