@@ -44,8 +44,6 @@ pure module subroutine backward_1d(self, previous, gradient)
44
44
call this_layer % backward(prev_layer % output, gradient)
45
45
type is (conv2d_layer)
46
46
call this_layer % backward(prev_layer % output, gradient)
47
- type is (locally_connected_1d_layer)
48
- call this_layer % backward(prev_layer % output, gradient)
49
47
type is (maxpool2d_layer)
50
48
call this_layer % backward(prev_layer % output, gradient)
51
49
end select
@@ -54,7 +52,6 @@ pure module subroutine backward_1d(self, previous, gradient)
54
52
55
53
end subroutine backward_1d
56
54
57
-
58
55
pure module subroutine backward_3d(self, previous, gradient)
59
56
implicit none
60
57
class(layer), intent (in out ) :: self
@@ -75,8 +72,6 @@ pure module subroutine backward_3d(self, previous, gradient)
75
72
call this_layer % backward(prev_layer % output, gradient)
76
73
type is (conv2d_layer)
77
74
call this_layer % backward(prev_layer % output, gradient)
78
- type is (locally_connected_1d_layer)
79
- call this_layer % backward(prev_layer % output, gradient)
80
75
type is (reshape3d_layer)
81
76
call this_layer % backward(prev_layer % output, gradient)
82
77
end select
@@ -91,8 +86,6 @@ pure module subroutine backward_3d(self, previous, gradient)
91
86
call this_layer % backward(prev_layer % output, gradient)
92
87
type is (input3d_layer)
93
88
call this_layer % backward(prev_layer % output, gradient)
94
- type is (locally_connected_1d_layer)
95
- call this_layer % backward(prev_layer % output, gradient)
96
89
type is (reshape3d_layer)
97
90
call this_layer % backward(prev_layer % output, gradient)
98
91
end select
@@ -141,8 +134,6 @@ pure module subroutine forward(self, input)
141
134
call this_layer % forward(prev_layer % output)
142
135
type is (conv2d_layer)
143
136
call this_layer % forward(prev_layer % output)
144
- type is (locally_connected_1d_layer)
145
- call this_layer % forward(prev_layer % output)
146
137
type is (maxpool2d_layer)
147
138
call this_layer % forward(prev_layer % output)
148
139
type is (reshape3d_layer)
@@ -157,8 +148,6 @@ pure module subroutine forward(self, input)
157
148
call this_layer % forward(prev_layer % output)
158
149
type is (conv2d_layer)
159
150
call this_layer % forward(prev_layer % output)
160
- type is (locally_connected_1d_layer)
161
- call this_layer % forward(prev_layer % output)
162
151
type is (maxpool2d_layer)
163
152
call this_layer % forward(prev_layer % output)
164
153
type is (reshape3d_layer)
@@ -173,8 +162,6 @@ pure module subroutine forward(self, input)
173
162
call this_layer % forward(prev_layer % output)
174
163
type is (conv2d_layer)
175
164
call this_layer % forward(prev_layer % output)
176
- type is (locally_connected_1d_layer)
177
- call this_layer % forward(prev_layer % output)
178
165
type is (maxpool2d_layer)
179
166
call this_layer % forward(prev_layer % output)
180
167
type is (reshape3d_layer)
@@ -218,6 +205,21 @@ pure module subroutine get_output_1d(self, output)
218
205
219
206
end subroutine get_output_1d
220
207
208
+ pure module subroutine get_output_2d(self, output)
209
+ implicit none
210
+ class(layer), intent (in ) :: self
211
+ real , allocatable , intent (out ) :: output(:,:)
212
+
213
+ select type (this_layer = > self % p)
214
+
215
+ type is (locally_connected_1d_layer)
216
+ allocate (output, source= this_layer % output)
217
+ class default
218
+ error stop ' 2d output can only be read from a locally_connected_1d layer'
219
+
220
+ end select
221
+
222
+ end subroutine get_output_2d
221
223
222
224
pure module subroutine get_output_3d(self, output)
223
225
implicit none
@@ -230,8 +232,6 @@ pure module subroutine get_output_3d(self, output)
230
232
allocate (output, source= this_layer % output)
231
233
type is (conv2d_layer)
232
234
allocate (output, source= this_layer % output)
233
- type is (locally_connected_1d_layer)
234
- allocate (output, source= this_layer % output)
235
235
type is (maxpool2d_layer)
236
236
allocate (output, source= this_layer % output)
237
237
type is (reshape3d_layer)
0 commit comments