Skip to content

Commit be5bb76

Browse files
committed
Implemented OneAdder's suggestions
1 parent 2b7c548 commit be5bb76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/nf/nf_locally_connected_1d_submodule.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pure module subroutine forward(self, input)
6565
do j = 1, self % width
6666
iws = j
6767
iwe = j + self % kernel_size - 1
68-
do concurrent (n = 1:self % filters)
68+
do n = 1, self % filters
6969
self % z(n, j) = sum(self % kernel(n, j, :, :) * input(:, iws:iwe)) + self % biases(n, j)
7070
end do
7171
end do
@@ -125,13 +125,13 @@ end function get_num_params
125125
module function get_params(self) result(params)
126126
class(locally_connected_1d_layer), intent(in), target :: self
127127
real, allocatable :: params(:)
128-
params = [reshape(self % kernel, [size(self % kernel)]), reshape(self % biases, [size(self % biases)])]
128+
params = [self % kernel, self % biases]
129129
end function get_params
130130

131131
module function get_gradients(self) result(gradients)
132132
class(locally_connected_1d_layer), intent(in), target :: self
133133
real, allocatable :: gradients(:)
134-
gradients = [reshape(self % dw, [size(self % dw)]), reshape(self % db, [size(self % db)])]
134+
gradients = [self % dw, self % db]
135135
end function get_gradients
136136

137137
module subroutine set_params(self, params)

0 commit comments

Comments
 (0)