MaxPool1D

class MaxPool1D(poolSize: IntArray, strides: IntArray, padding: ConvPadding, name: String) : Layer

Max pooling operation for 1D temporal data (e.g. audio, timeseries).

Downsamples the input by taking maximum value over a temporal window of size poolSize.

Since

0.3

Constructors

MaxPool1D
Link copied to clipboard
fun MaxPool1D(poolSize: Int = 2, strides: Int = 2, padding: ConvPadding = ConvPadding.VALID, name: String = "")
MaxPool1D
Link copied to clipboard
fun MaxPool1D(poolSize: IntArray = intArrayOf(1, 2, 1), strides: IntArray = intArrayOf(1, 2, 1), padding: ConvPadding = ConvPadding.VALID, name: String = "")

Functions

build
Link copied to clipboard
open override fun build(tf: Ops, input: Operand<Float>, isTraining: Operand<Boolean>, numberOfLosses: Operand<Float>?): Operand<Float>
open fun build(tf: Ops, input: List<Operand<Float>>, isTraining: Operand<Boolean>, numberOfLosses: Operand<Float>?): Operand<Float>

Extend this function to define variables in the layer and compute layer output.

invoke
Link copied to clipboard
operator fun invoke(vararg layers: Layer): Layer

Important part of functional API. It takes layers as input and saves them to the inboundLayers of the given layer.

toString
Link copied to clipboard
open override fun toString(): String

Properties

hasActivation
Link copied to clipboard
open override val hasActivation: Boolean

Returns True, if layer has internal activation function.

inboundLayers
Link copied to clipboard
var inboundLayers: MutableList<Layer>

Returns inbound layers.

name
Link copied to clipboard
var name: String

Layer name. A new name is generated during model compilation when provided name is empty.

outboundLayers
Link copied to clipboard
var outboundLayers: MutableList<Layer>

Returns outbound layers.

outputShape
Link copied to clipboard
lateinit var outputShape: TensorShape

Output data tensor shape.

padding
Link copied to clipboard
val padding: ConvPadding

Padding strategy; can be either of ConvPadding.VALID which means no padding, or ConvPadding.SAME which means padding the input equally such that the output has the same dimension as the input.

parentModel
Link copied to clipboard
var parentModel: GraphTrainableModel? = null

Model where this layer is used.

poolSize
Link copied to clipboard
val poolSize: IntArray

Size of the temporal pooling window for each dimension of input.

strides
Link copied to clipboard
val strides: IntArray

The amount of shift for pooling window per each input dimension in each pooling step.