@@ -208,22 +208,21 @@ module function conv2d(filters, kernel_size, activation) result(res)
208208 end function conv2d
209209
210210 module function locally_connected_1d (filters , kernel_size , activation ) result(res)
211- ! ! CHANGE THE COMMENTS!!!
212- ! ! 2-d convolutional layer constructor.
211+ ! ! 1-d locally connected network constructor
213212 ! !
214- ! ! This layer is for building 2 -d convolutional network.
215- ! ! Although the established convention is to call these layers 2 -d,
216- ! ! the shape of the data is actuall 3 -d: image width, image height ,
213+ ! ! This layer is for building 1 -d locally connected network.
214+ ! ! Although the established convention is to call these layers 1 -d,
215+ ! ! the shape of the data is actuall 2 -d: image width,
217216 ! ! and the number of channels.
218- ! ! A conv2d layer must not be the first layer in the network.
217+ ! ! A locally connected 1d layer must not be the first layer in the network.
219218 ! !
220219 ! ! Example:
221220 ! !
222221 ! ! ```
223- ! ! use nf, only :: conv2d , layer
224- ! ! type(layer) :: conv2d_layer
225- ! ! conv2d_layer = dense(filters=32, kernel_size=3)
226- ! ! conv2d_layer = dense(filters=32, kernel_size=3, activation='relu')
222+ ! ! use nf, only :: locally_connected_1d , layer
223+ ! ! type(layer) :: locally_connected_1d_layer
224+ ! ! locally_connected_1d_layer = dense(filters=32, kernel_size=3)
225+ ! ! locally_connected_1d_layer = dense(filters=32, kernel_size=3, activation='relu')
227226 ! ! ```
228227 integer , intent (in ) :: filters
229228 ! ! Number of filters in the output of the layer
@@ -236,17 +235,17 @@ module function locally_connected_1d(filters, kernel_size, activation) result(re
236235 end function locally_connected_1d
237236
238237 module function maxpool1d (pool_size , stride ) result(res)
239- ! ! 2 -d maxpooling layer constructor.
238+ ! ! 1 -d maxpooling layer constructor.
240239 ! !
241- ! ! This layer is for downscaling other layers, typically `conv2d `.
240+ ! ! This layer is for downscaling other layers, typically `conv1d `.
242241 ! !
243242 ! ! Example:
244243 ! !
245244 ! ! ```
246- ! ! use nf, only :: maxpool2d , layer
247- ! ! type(layer) :: maxpool2d_layer
248- ! ! maxpool2d_layer = maxpool2d (pool_size=2)
249- ! ! maxpool2d_layer = maxpool2d (pool_size=2, stride=3)
245+ ! ! use nf, only :: maxpool1d , layer
246+ ! ! type(layer) :: maxpool1d_layer
247+ ! ! maxpool1d_layer = maxpool1d (pool_size=2)
248+ ! ! maxpool1d_layer = maxpool1d (pool_size=2, stride=3)
250249 ! ! ```
251250 integer , intent (in ) :: pool_size
252251 ! ! Width of the pooling window, commonly 2
@@ -292,9 +291,9 @@ end function reshape
292291
293292 module function reshape2d (output_shape ) result(res)
294293 ! ! Rank-1 to rank-any reshape layer constructor.
295- ! ! Currently implemented is only rank-3 for the output of the reshape.
294+ ! ! Currently implemented is only rank-2 for the output of the reshape.
296295 ! !
297- ! ! This layer is for connecting 1-d inputs to conv2d or similar layers.
296+ ! ! This layer is for connecting 1-d inputs to conv1d or similar layers.
298297 integer , intent (in ) :: output_shape(:)
299298 ! ! Shape of the output
300299 type (layer) :: res
0 commit comments