Print neural operator layer to unit
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(neural_operator_layer_type), | intent(in) | :: | this |
Instance of the neural operator layer |
||
| integer, | intent(in) | :: | unit |
File unit |
subroutine print_to_unit_neural_operator(this, unit) !! Print neural operator layer to unit use coreutils, only: to_upper implicit none ! Arguments class(neural_operator_layer_type), intent(in) :: this !! Instance of the neural operator layer integer, intent(in) :: unit !! File unit ! Write hyperparameters !--------------------------------------------------------------------------- write(unit,'(3X,"NUM_INPUTS = ",I0)') this%num_inputs write(unit,'(3X,"NUM_OUTPUTS = ",I0)') this%num_outputs write(unit,'(3X,"USE_BIAS = ",L1)') this%use_bias if(this%activation%name .ne. 'none')then call this%activation%print_to_unit(unit) end if ! Write weights, kernel coupling, and optional bias !--------------------------------------------------------------------------- write(unit,'("WEIGHTS")') write(unit,'(5(E16.8E2))') this%params(1)%val(:,1) ! W write(unit,'(5(E16.8E2))') this%params(2)%val(:,1) ! W_k if(this%use_bias)then write(unit,'(5(E16.8E2))') this%params(3)%val(:,1) ! b end if write(unit,'("END WEIGHTS")') end subroutine print_to_unit_neural_operator