Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 68516fb

Browse files
authored
Make pooling layer properties public. (#548)
1 parent 4f193c1 commit 68516fb

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Sources/TensorFlow/Layers/Pooling.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
@frozen
1717
public struct MaxPool1D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
1818
/// The size of the sliding reduction window for pooling.
19-
@noDerivative let poolSize: Int
19+
@noDerivative public let poolSize: Int
2020
/// The stride of the sliding window for temporal dimension.
21-
@noDerivative let stride: Int
21+
@noDerivative public let stride: Int
2222
/// The padding algorithm for pooling.
23-
@noDerivative let padding: Padding
23+
@noDerivative public let padding: Padding
2424

2525
/// Creates a max pooling layer.
2626
///
@@ -53,12 +53,12 @@ public struct MaxPool1D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
5353
@frozen
5454
public struct MaxPool2D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
5555
/// The size of the sliding reduction window for pooling.
56-
@noDerivative let poolSize: (Int, Int, Int, Int)
56+
@noDerivative public let poolSize: (Int, Int, Int, Int)
5757
/// The strides of the sliding window for each dimension of a 4-D input.
5858
/// Strides in non-spatial dimensions must be `1`.
59-
@noDerivative let strides: (Int, Int, Int, Int)
59+
@noDerivative public let strides: (Int, Int, Int, Int)
6060
/// The padding algorithm for pooling.
61-
@noDerivative let padding: Padding
61+
@noDerivative public let padding: Padding
6262

6363
/// Creates a max pooling layer.
6464
public init(poolSize: (Int, Int, Int, Int), strides: (Int, Int, Int, Int), padding: Padding) {
@@ -96,12 +96,12 @@ public extension MaxPool2D {
9696
@frozen
9797
public struct MaxPool3D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
9898
/// The size of the sliding reduction window for pooling.
99-
@noDerivative let poolSize: (Int, Int, Int, Int, Int)
99+
@noDerivative public let poolSize: (Int, Int, Int, Int, Int)
100100
/// The strides of the sliding window for each dimension of a 5-D input.
101101
/// Strides in non-spatial dimensions must be `1`.
102-
@noDerivative let strides: (Int, Int, Int, Int, Int)
102+
@noDerivative public let strides: (Int, Int, Int, Int, Int)
103103
/// The padding algorithm for pooling.
104-
@noDerivative let padding: Padding
104+
@noDerivative public let padding: Padding
105105

106106
/// Creates a max pooling layer.
107107
public init(
@@ -154,11 +154,11 @@ public extension MaxPool3D {
154154
@frozen
155155
public struct AvgPool1D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
156156
/// The size of the sliding reduction window for pooling.
157-
@noDerivative let poolSize: Int
157+
@noDerivative public let poolSize: Int
158158
/// The stride of the sliding window for temporal dimension.
159-
@noDerivative let stride: Int
159+
@noDerivative public let stride: Int
160160
/// The padding algorithm for pooling.
161-
@noDerivative let padding: Padding
161+
@noDerivative public let padding: Padding
162162

163163
/// Creates an average pooling layer.
164164
///
@@ -191,12 +191,12 @@ public struct AvgPool1D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
191191
@frozen
192192
public struct AvgPool2D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
193193
/// The size of the sliding reduction window for pooling.
194-
@noDerivative let poolSize: (Int, Int, Int, Int)
194+
@noDerivative public let poolSize: (Int, Int, Int, Int)
195195
/// The strides of the sliding window for each dimension of a 4-D input.
196196
/// Strides in non-spatial dimensions must be `1`.
197-
@noDerivative let strides: (Int, Int, Int, Int)
197+
@noDerivative public let strides: (Int, Int, Int, Int)
198198
/// The padding algorithm for pooling.
199-
@noDerivative let padding: Padding
199+
@noDerivative public let padding: Padding
200200

201201
/// Creates an average pooling layer.
202202
public init(poolSize: (Int, Int, Int, Int), strides: (Int, Int, Int, Int), padding: Padding) {
@@ -234,12 +234,12 @@ public extension AvgPool2D {
234234
@frozen
235235
public struct AvgPool3D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer {
236236
/// The size of the sliding reduction window for pooling.
237-
@noDerivative let poolSize: (Int, Int, Int, Int, Int)
237+
@noDerivative public let poolSize: (Int, Int, Int, Int, Int)
238238
/// The strides of the sliding window for each dimension of a 5-D input.
239239
/// Strides in non-spatial dimensions must be `1`.
240-
@noDerivative let strides: (Int, Int, Int, Int, Int)
240+
@noDerivative public let strides: (Int, Int, Int, Int, Int)
241241
/// The padding algorithm for pooling.
242-
@noDerivative let padding: Padding
242+
@noDerivative public let padding: Padding
243243

244244
/// Creates an average pooling layer.
245245
public init(

0 commit comments

Comments
 (0)