Module for the FTorch torch_model type and associated procedures.
Evaluate CrossEntropyLoss
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(torch_tensor), | intent(inout) | :: | loss_tensor |
Tensor to hold the loss value |
||
| type(torch_tensor), | intent(in) | :: | input_tensor |
Input tensor to evaluate loss at |
||
| type(torch_tensor), | intent(in) | :: | target_tensor |
Target tensor to evaluate loss against |
||
| integer, | intent(in), | optional | :: | reduction_type |
Optional reduction type (default: torch_kMean) |
Evaluate MSELoss
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(torch_tensor), | intent(inout) | :: | loss_tensor |
Tensor to hold the loss value |
||
| type(torch_tensor), | intent(in) | :: | input_tensor |
Input tensor to evaluate loss at |
||
| type(torch_tensor), | intent(in) | :: | target_tensor |
Target tensor to evaluate loss against |
||
| integer, | intent(in), | optional | :: | reduction_type |
Reduction type to use over batches (default: torch_kMean) |