athena__diffstruc_extd_submodule_conv Submodule

Submodule containing implementations for extended diffstruc array operations


Uses


Functions

function get_partial_conv1d_input(this, upstream_grad) result(output)

Get partial derivative wrt input for 1D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

function get_partial_conv1d_kernel(this, upstream_grad) result(output)

Get partial derivative wrt kernel for 1D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

function get_partial_conv2d_input(this, upstream_grad) result(output)

Get partial derivative wrt input for 2D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

function get_partial_conv2d_kernel(this, upstream_grad) result(output)

Get partial derivative wrt kernel for 2D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

function get_partial_conv3d_input(this, upstream_grad) result(output)

Get partial derivative wrt input for 3D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

function get_partial_conv3d_kernel(this, upstream_grad) result(output)

Get partial derivative wrt kernel for 3D convolution

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)


Subroutines

pure subroutine get_partial_conv1d_input_val(this, upstream_grad, output)

Get partial derivative wrt input for 1D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

pure subroutine get_partial_conv1d_kernel_val(this, upstream_grad, output)

Get partial derivative wrt kernel for 1D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

pure subroutine get_partial_conv2d_input_val(this, upstream_grad, output)

Get partial derivative wrt input for 2D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

pure subroutine get_partial_conv2d_kernel_val(this, upstream_grad, output)

Get partial derivative wrt kernel for 2D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

pure subroutine get_partial_conv3d_input_val(this, upstream_grad, output)

Get partial derivative wrt input for 3D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

pure subroutine get_partial_conv3d_kernel_val(this, upstream_grad, output)

Get partial derivative wrt kernel for 3D convolution (subroutine version)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

Module Functions

module function conv1d(input, kernel, stride, dilation) result(output)

1D convolution operation

Arguments

Type IntentOptional Attributes Name
type(array_type), intent(in), target :: input
type(array_type), intent(in), target :: kernel
integer, intent(in) :: stride
integer, intent(in) :: dilation

Return Value type(array_type), pointer

module function conv2d(input, kernel, stride, dilation) result(output)

2D convolution operation

Arguments

Type IntentOptional Attributes Name
type(array_type), intent(in), target :: input
type(array_type), intent(in), target :: kernel
integer, intent(in), dimension(2) :: stride
integer, intent(in), dimension(2) :: dilation

Return Value type(array_type), pointer

module function conv3d(input, kernel, stride, dilation) result(output)

3D convolution operation

Arguments

Type IntentOptional Attributes Name
type(array_type), intent(in), target :: input
type(array_type), intent(in), target :: kernel
integer, intent(in), dimension(3) :: stride
integer, intent(in), dimension(3) :: dilation

Return Value type(array_type), pointer