Skip to content

Commit 54d1bb0

Browse files
committed
linear2d_layer: remove flatten2d layer
1 parent c4b8fc7 commit 54d1bb0

File tree

5 files changed

+1
-239
lines changed

5 files changed

+1
-239
lines changed

src/nf/nf_flatten2d_layer.f90

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/nf/nf_flatten2d_layer_submodule.f90

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/nf/nf_layer_constructors.f90

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module nf_layer_constructors
88
implicit none
99

1010
private
11-
public :: conv2d, dense, flatten, flatten2d, input, maxpool2d, reshape, linear2d
11+
public :: conv2d, dense, flatten, input, maxpool2d, reshape, linear2d
1212

1313
interface input
1414

@@ -125,25 +125,6 @@ module function flatten() result(res)
125125
!! Resulting layer instance
126126
end function flatten
127127

128-
module function flatten2d() result(res)
129-
!! Flatten (2-d -> 1-d) layer constructor.
130-
!!
131-
!! Use this layer to chain layers with 2-d outputs to layers with 2-d
132-
!! inputs.
133-
!!
134-
!! A flatten layer must not be the first layer in the network.
135-
!!
136-
!! Example:
137-
!!
138-
!! ```
139-
!! use nf, only :: flatten, layer
140-
!! type(layer) :: flatten_layer
141-
!! flatten_layer = flatten()
142-
!! ```
143-
type(layer) :: res
144-
!! Resulting layer instance
145-
end function flatten2d
146-
147128
module function conv2d(filters, kernel_size, activation) result(res)
148129
!! 2-d convolutional layer constructor.
149130
!!

src/nf/nf_layer_constructors_submodule.f90

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use nf_conv2d_layer, only: conv2d_layer
55
use nf_dense_layer, only: dense_layer
66
use nf_flatten_layer, only: flatten_layer
7-
use nf_flatten2d_layer, only: flatten2d_layer
87
use nf_input1d_layer, only: input1d_layer
98
use nf_input2d_layer, only: input2d_layer
109
use nf_input3d_layer, only: input3d_layer
@@ -73,12 +72,6 @@ module function flatten() result(res)
7372
end function flatten
7473

7574

76-
module function flatten2d() result(res)
77-
type(layer) :: res
78-
res % name = 'flatten2d'
79-
allocate(res % p, source=flatten2d_layer())
80-
end function flatten2d
81-
8275

8376
module function input1d(layer_size) result(res)
8477
integer, intent(in) :: layer_size

test/test_flatten2d_layer.f90

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)