compute_base Module Function

private module function compute_base(this, predicted, expected) result(output)

Placeholder for compute function in base_loss_type

Arguments

Type IntentOptional Attributes Name
class(base_loss_type), intent(in), target :: this

Instance of the base loss function

type(array_type), intent(inout), dimension(:,:), target :: predicted

Predicted values

type(array_type), intent(in), dimension(size(predicted,1),size(predicted,2)) :: expected

Expected values

Return Value type(array_type), pointer

Loss value


Source Code

     module function compute_base(this, predicted, expected) result(output)
       !! Compute the loss of a model
       class(base_loss_type), intent(in), target :: this
       !! Instance of the physics-informed neural network loss function
       type(array_type), dimension(:,:), intent(inout), target :: predicted
       !! Predicted values
       type(array_type), dimension(size(predicted,1),size(predicted,2)), intent(in) :: &
            expected
       !! Expected values
       type(array_type), pointer :: output
       !! Physics-informed neural network loss
     end function compute_base