athena__diffstruc_extd_submodule_pool Submodule

Submodule containing implementations for extended diffstruc array operations


Uses


Functions

function get_partial_avgpool1d(this, upstream_grad) result(output)

Get the partial derivative for average pooling

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_avgpool2d(this, upstream_grad) result(output)

Get the partial derivative for average pooling

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_avgpool3d(this, upstream_grad) result(output)

Get the partial derivative for 3D average pooling

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_maxpool1d(this, upstream_grad) result(output)

Get the partial derivative for max pooling

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_maxpool2d(this, upstream_grad) result(output)

Get the partial derivative for max pooling

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_maxpool3d(this, upstream_grad) result(output)

Get the partial derivative for 3D max pooling

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_avgpool1d_val(this, upstream_grad, output)

Optimised backward pass for 1D average pooling

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_avgpool2d_val(this, upstream_grad, output)

Optimised backward pass for 2D average pooling

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_avgpool3d_val(this, upstream_grad, output)

Optimised backward pass for 3D average pooling

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_maxpool1d_val(this, upstream_grad, output)

Optimised backward pass for 1D max pooling

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_maxpool2d_val(this, upstream_grad, output)

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_maxpool3d_val(this, upstream_grad, output)

Optimised backward pass for 3D max pooling

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 avgpool1d(input, pool_size, stride) result(output)

1D average pooling operation

Arguments

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

Return Value type(array_type), pointer

module function avgpool2d(input, pool_size, stride) result(output)

2D average pooling operation

Arguments

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

Return Value type(array_type), pointer

module function avgpool3d(input, pool_size, stride) result(output)

3D average pooling operation

Arguments

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

Return Value type(array_type), pointer

module function maxpool1d(input, pool_size, stride) result(output)

1D max pooling operation

Arguments

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

Return Value type(array_type), pointer

module function maxpool2d(input, pool_size, stride) result(output)

2D max pooling operation

Arguments

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

Return Value type(array_type), pointer

module function maxpool3d(input, pool_size, stride) result(output)

3D max pooling operation

Arguments

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

Return Value type(array_type), pointer