Skip to content

Commit 9ae50ee

Browse files
committed
Merging oneadder's changes
1 parent 2c929d8 commit 9ae50ee

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/nf/nf_layer_constructors_submodule.f90

-3
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ module function input3d(dim1, dim2, dim3) result(res)
106106
res % initialized = .true.
107107
end function input3d
108108

109-
<<<<<<< HEAD
110-
=======
111109
module function locally_connected_1d(filters, kernel_size, activation) result(res)
112110
integer, intent(in) :: filters
113111
integer, intent(in) :: kernel_size
@@ -159,7 +157,6 @@ module function maxpool1d(pool_size, stride) result(res)
159157
)
160158

161159
end function maxpool1d
162-
>>>>>>> 0fbbda4 (adding locally_connected_1d to neural-fortran environment)
163160

164161
module function maxpool2d(pool_size, stride) result(res)
165162
integer, intent(in) :: pool_size

src/nf/nf_layer_submodule.f90

+2-16
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,6 @@ pure module subroutine get_output_1d(self, output)
218218

219219
end subroutine get_output_1d
220220

221-
pure module subroutine get_output_2d(self, output)
222-
implicit none
223-
class(layer), intent(in) :: self
224-
real, allocatable, intent(out) :: output(:,:)
225-
226-
select type(this_layer => self % p)
227-
228-
type is(locally_connected_1d_layer)
229-
allocate(output, source=this_layer % output)
230-
class default
231-
error stop '2d output can only be read from a locally_connected_1d layer'
232-
233-
end select
234-
235-
end subroutine get_output_2d
236-
237221
pure module subroutine get_output_2d(self, output)
238222
implicit none
239223
class(layer), intent(in) :: self
@@ -243,6 +227,8 @@ pure module subroutine get_output_2d(self, output)
243227

244228
type is(input2d_layer)
245229
allocate(output, source=this_layer % output)
230+
type is(locally_connected_1d_layer)
231+
allocate(output, source=this_layer % output)
246232
class default
247233
error stop '1-d output can only be read from an input1d, dense, or flatten layer.'
248234

0 commit comments

Comments
 (0)