ZeroPadding3D

class ZeroPadding3D : AbstractZeroPadding

Zero-padding layer for 3D input (e.g. video). This layer can add zeros in the rows, cols and depth of a video tensor.

Constructors

ZeroPadding3D
Link copied to clipboard
fun ZeroPadding3D(padding: Int, name: String = "")

Constructs an instance of ZeroPadding3D layer

ZeroPadding3D
Link copied to clipboard
fun ZeroPadding3D(padding: Triple<Int, Int, Int>, name: String = "")

Constructs an instance of ZeroPadding3D layer

ZeroPadding3D
Link copied to clipboard
fun ZeroPadding3D(padding: Array<Pair<Int, Int>>, name: String = "")

Constructs an instance of ZeroPadding3D layer

ZeroPadding3D
Link copied to clipboard
fun ZeroPadding3D(padding: IntArray, name: String = "")

Constructs an instance of ZeroPadding3D layer

Functions

build
Link copied to clipboard
open override fun build(tf: Ops, kGraph: KGraph, inputShape: Shape)

Extend this function to define variables in layer.

buildFromInboundLayers
Link copied to clipboard
fun buildFromInboundLayers(tf: Ops, kGraph: KGraph)

Extend this function to define variables in layer.

computeOutputShape
Link copied to clipboard
open override fun computeOutputShape(inputShape: Shape): Shape

Computes output shape, based on inputShape and Layer type.

computeOutputShapeFromInboundLayers
Link copied to clipboard
open fun computeOutputShapeFromInboundLayers(): TensorShape

Computes output shape, based on input shapes of inbound layers.

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

Builds main layer input transformation with tf. Depends on Layer type.

open fun forward(tf: Ops, input: List<Operand<Float>>, isTraining: Operand<Boolean>, numberOfLosses: Operand<Float>?): Operand<Float>

Builds main layer input transformation with tf. Depends on Layer type.

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.

isTrainable
Link copied to clipboard
var isTrainable: Boolean = true

True, if layer's weights could be changed during training. If false, layer's weights are frozen and could be changed during the training.

name
Link copied to clipboard
var name: String
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: IntArray

6 numbers interpreted as (left_dim1_pad, right_dim1_pad, left_dim2_pad, right_dim2_pad, left_dim3_pad, right_dim3_pad).

paramCount
Link copied to clipboard
open override val paramCount: Int

Returns amount of neurons.

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

Model where this layer is used.

weights
Link copied to clipboard
open override var weights: Map<String, Array<*>>

Layer's weights.