@@ -45,8 +45,6 @@ pure module subroutine backward_1d(self, previous, gradient)
4545 call this_layer % backward(prev_layer % output, gradient)
4646 type is (conv2d_layer)
4747 call this_layer % backward(prev_layer % output, gradient)
48- type is (locally_connected_1d_layer)
49- call this_layer % backward(prev_layer % output, gradient)
5048 type is (maxpool2d_layer)
5149 call this_layer % backward(prev_layer % output, gradient)
5250 end select
@@ -55,7 +53,6 @@ pure module subroutine backward_1d(self, previous, gradient)
5553
5654 end subroutine backward_1d
5755
58-
5956 pure module subroutine backward_2d(self, previous, gradient)
6057 implicit none
6158 class(layer), intent (in out ) :: self
@@ -88,8 +85,6 @@ pure module subroutine backward_3d(self, previous, gradient)
8885 call this_layer % backward(prev_layer % output, gradient)
8986 type is (conv2d_layer)
9087 call this_layer % backward(prev_layer % output, gradient)
91- type is (locally_connected_1d_layer)
92- call this_layer % backward(prev_layer % output, gradient)
9388 type is (reshape3d_layer)
9489 call this_layer % backward(prev_layer % output, gradient)
9590 end select
@@ -104,8 +99,6 @@ pure module subroutine backward_3d(self, previous, gradient)
10499 call this_layer % backward(prev_layer % output, gradient)
105100 type is (input3d_layer)
106101 call this_layer % backward(prev_layer % output, gradient)
107- type is (locally_connected_1d_layer)
108- call this_layer % backward(prev_layer % output, gradient)
109102 type is (reshape3d_layer)
110103 call this_layer % backward(prev_layer % output, gradient)
111104 end select
@@ -154,8 +147,6 @@ pure module subroutine forward(self, input)
154147 call this_layer % forward(prev_layer % output)
155148 type is (conv2d_layer)
156149 call this_layer % forward(prev_layer % output)
157- type is (locally_connected_1d_layer)
158- call this_layer % forward(prev_layer % output)
159150 type is (maxpool2d_layer)
160151 call this_layer % forward(prev_layer % output)
161152 type is (reshape3d_layer)
@@ -170,8 +161,6 @@ pure module subroutine forward(self, input)
170161 call this_layer % forward(prev_layer % output)
171162 type is (conv2d_layer)
172163 call this_layer % forward(prev_layer % output)
173- type is (locally_connected_1d_layer)
174- call this_layer % forward(prev_layer % output)
175164 type is (maxpool2d_layer)
176165 call this_layer % forward(prev_layer % output)
177166 type is (reshape3d_layer)
@@ -186,8 +175,6 @@ pure module subroutine forward(self, input)
186175 call this_layer % forward(prev_layer % output)
187176 type is (conv2d_layer)
188177 call this_layer % forward(prev_layer % output)
189- type is (locally_connected_1d_layer)
190- call this_layer % forward(prev_layer % output)
191178 type is (maxpool2d_layer)
192179 call this_layer % forward(prev_layer % output)
193180 type is (reshape3d_layer)
@@ -231,6 +218,21 @@ pure module subroutine get_output_1d(self, output)
231218
232219 end subroutine get_output_1d
233220
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
234236
235237 pure module subroutine get_output_2d(self, output)
236238 implicit none
@@ -260,8 +262,6 @@ pure module subroutine get_output_3d(self, output)
260262 allocate (output, source= this_layer % output)
261263 type is (conv2d_layer)
262264 allocate (output, source= this_layer % output)
263- type is (locally_connected_1d_layer)
264- allocate (output, source= this_layer % output)
265265 type is (maxpool2d_layer)
266266 allocate (output, source= this_layer % output)
267267 type is (reshape3d_layer)
0 commit comments