Skip to content

Commit eb7e112

Browse files
committed
start implementation of stride in conv2d
1 parent e73af4a commit eb7e112

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nf/nf_conv2d_layer_submodule.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ module subroutine init(self, input_shape)
3030
integer, intent(in) :: input_shape(:)
3131

3232
self % channels = input_shape(1)
33-
self % width = input_shape(2) - self % kernel_size + 1
34-
self % height = input_shape(3) - self % kernel_size + 1
33+
self % width = (input_shape(2) - self % kernel_size + 1) / self % stride(1)
34+
self % height = (input_shape(3) - self % kernel_size + 1) / self % stride(2)
3535

3636
! Output of shape filters x width x height
3737
allocate(self % output(self % filters, self % width, self % height))

0 commit comments

Comments
 (0)