Conv1DTranspose

class Conv1DTranspose(filters: Int, kernelLength: Int, strides: IntArray, dilations: IntArray, activation: Activations, kernelInitializer: Initializer, biasInitializer: Initializer, kernelRegularizer: Regularizer?, biasRegularizer: Regularizer?, activityRegularizer: Regularizer?, padding: ConvPadding, outputPadding: IntArray?, useBias: Boolean, name: String) : ConvTranspose, NoGradients

1D convolution transpose layer.

This is an operation going in the opposite direction of a normal convolution: it transforms a tensor shaped like an output of some convolution into tensor that has the shape of the input.

This layer expects input data of size (N, L, C) where

N - batch size
L - length of signal sequence
C - number of channels

Note: dilation values greater than 1 are not supported on cpu (see https://github.com/tensorflow/tensorflow/issues/28264).

Since

0.4

Parameters

name

custom layer name

Constructors

Conv1DTranspose
Link copied to clipboard
fun Conv1DTranspose(filters: Int = 3, kernelLength: Int = 3, strides: IntArray = intArrayOf(1, 1, 1), dilations: IntArray = intArrayOf(1, 1, 1), activation: Activations = Activations.Relu, kernelInitializer: Initializer = HeNormal(), biasInitializer: Initializer = HeUniform(), kernelRegularizer: Regularizer? = null, biasRegularizer: Regularizer? = null, activityRegularizer: Regularizer? = null, padding: ConvPadding = ConvPadding.SAME, outputPadding: IntArray? = null, useBias: Boolean = true, 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

activation
Link copied to clipboard
open override val activation: Activations

activation function

activityRegularizer
Link copied to clipboard
open override val activityRegularizer: Regularizer? = null

regularizer function applied to the output of the layer

biasInitializer
Link copied to clipboard
open override val biasInitializer: Initializer

initializer for the bias

biasRegularizer
Link copied to clipboard
open override val biasRegularizer: Regularizer? = null

regularizer for the bias

dilations
Link copied to clipboard
open override val dilations: IntArray

dilations of the convolution for each dimension of the input tensor (three numbers). Currently, dilation values greater than 1 are not supported on cpu.

dimensions
Link copied to clipboard
val dimensions: Int

dimensionality of this convolution operation

filters
Link copied to clipboard
open override val filters: Int = 3

dimensionality of the output space (i.e. the number of filters in the convolution)

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.

kernelInitializer
Link copied to clipboard
open override val kernelInitializer: Initializer

initializer for the kernel

kernelLength
Link copied to clipboard
val kernelLength: Int = 3

size of the convolutional kernel (one number)

kernelRegularizer
Link copied to clipboard
open override val kernelRegularizer: Regularizer? = null

regularizer for the kernel

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.

outputPadding
Link copied to clipboard
open override val outputPadding: IntArray? = null

the amount of explicit padding to use (six numbers: two for each dimension).

outputShape
Link copied to clipboard
lateinit var outputShape: TensorShape

Output data tensor shape.

padding
Link copied to clipboard
open override val padding: ConvPadding

type of padding to use

paramCount
Link copied to clipboard
open val paramCount: Int

Number of parameters in this layer.

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

Model where this layer is used.

strides
Link copied to clipboard
open override val strides: IntArray

strides of the convolution for each dimension of the input tensor (three numbers)

useBias
Link copied to clipboard
open override val useBias: Boolean = true

a flag that specifies if the bias should be used

variables
Link copied to clipboard
open override val variables: List<KVariable>

Variables used in this layer.