# FractionalMaxPool2D

Stay organized with collections Save and categorize content based on your preferences.
``````@frozen
public struct FractionalMaxPool2D<Scalar> : ParameterlessLayer where Scalar : TensorFlowFloatingPoint``````

A fractional max pooling layer for spatial data. Note: `FractionalMaxPool` does not have an XLA implementation, and thus may have performance implications.

• ``` TangentVector ```

#### Declaration

``public typealias TangentVector = EmptyTangentVector``
• ``` poolingRatio ```

Pooling ratios for each dimension of input of shape (batch, height, width, channels). Currently pooling in only height and width is supported.

#### Declaration

``````@noDerivative
public let poolingRatio: (Double, Double, Double, Double)``````
• ``` pseudoRandom ```

Determines whether pooling sequence is generated by pseudorandom fashion.

#### Declaration

``````@noDerivative
public let pseudoRandom: Bool``````
• ``` overlapping ```

Determines whether values at the boundary of adjacent pooling cells are used by both cells

#### Declaration

``````@noDerivative
public let overlapping: Bool``````
• ``` deterministic ```

Determines whether a fixed pooling region will be used when iterating over a FractionalMaxPool2D node in the computation graph.

#### Declaration

``````@noDerivative
public let deterministic: Bool``````
• ``` seed ```

Seed for the random number generator

#### Declaration

``````@noDerivative
public let seed: Int64``````
• ``` seed2 ```

A second seed to avoid seed collision

#### Declaration

``````@noDerivative
public let seed2: Int64``````
• ``` init(poolingRatio:pseudoRandom:overlapping:deterministic:seed:seed2:) ```

Initializes a `FractionalMaxPool` layer with configurable `poolingRatio`.

#### Declaration

``````public init(
poolingRatio: (Double, Double, Double, Double), pseudoRandom: Bool = false,
overlapping: Bool = false, deterministic: Bool = false, seed: Int64 = 0, seed2: Int64 = 0
)``````
• ``` forward(_:) ```

Returns the output obtained from applying the layer to the given input.

#### Declaration

``````@differentiable
public func forward(_ input: Tensor<Scalar>) -> Tensor<Scalar>``````

#### Parameters

 ``` input ``` The input to the layer.

#### Return Value

The output.

• ``` init(poolingRatio:pseudoRandom:overlapping:deterministic:seed:seed2:) ```

Creates a fractional max pooling layer.

#### Declaration

``````public init(
poolingRatio: (Double, Double), pseudoRandom: Bool = false,
overlapping: Bool = false, deterministic: Bool = false, seed: Int64 = 0, seed2: Int64 = 0
)``````

#### Parameters

 ``` poolingRatio ``` Pooling ratio for height and width dimensions of input. ``` pseudoRandom ``` Determines wheter the pooling sequence is generated in a pseudorandom fashion. ``` overlapping ``` Determines whether values at the boundary of adjacent pooling cells are used by both cells. ``` deterministic ``` Determines whether a fixed pooling region will be used when iterating over a FractionalMaxPool2D node in the computation graph. ``` seed ``` A seed for random number generator. ``` seed2 ``` A second seed to avoid seed collision.
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]