Initialise a Gaussian activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | optional | :: | scale |
Optional scale factor for activation output |
|
| real(kind=real32), | intent(in), | optional | :: | sigma |
Optional standard deviation parameter |
|
| real(kind=real32), | intent(in), | optional | :: | mu |
Optional mean parameter |
|
| type(onnx_attribute_type), | intent(in), | optional, | dimension(:) | :: | attributes |
Optional array of ONNX attributes |
Gaussian activation type
function initialise(scale, sigma, mu, attributes) result(activation) !! Initialise a Gaussian activation function implicit none ! Arguments real(real32), intent(in), optional :: scale !! Optional scale factor for activation output real(real32), intent(in), optional :: sigma !! Optional standard deviation parameter real(real32), intent(in), optional :: mu !! Optional mean parameter type(onnx_attribute_type), dimension(:), intent(in), optional :: attributes !! Optional array of ONNX attributes type(gaussian_actv_type) :: activation !! Gaussian activation type call activation%reset() if(present(scale)) activation%scale = scale if(abs(activation%scale-1._real32) .gt. 1.e-6_real32)then activation%apply_scaling = .true. end if if(present(sigma)) activation%sigma = sigma if(present(mu)) activation%mu = mu if(present(attributes))then call activation%apply_attributes(attributes) end if end function initialise