Variable

open class Variable(varIndex: Int, name: String?, shape: Shape, traceId: TraceId) : TracingTensor.Companion.TracingTensorBase

Functions

accept
Link copied to clipboard
open override fun <R> accept(v: TracingVisitor<R>): R
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
floatEval
Link copied to clipboard
open override fun floatEval(vars: FloatArray): Float
get
Link copied to clipboard
open operator fun get(index: Int): DTensor
open operator fun get(vararg indices: Int): DTensor
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toCodeString
Link copied to clipboard
open fun toCodeString(): String
toString
Link copied to clipboard
open override fun toString(): String
wrap
Link copied to clipboard
open override fun wrap(wrapper: Wrapper): DTensor

Wrapper around the tensor

Properties

derivativeID
Link copied to clipboard
open override val derivativeID: DerivativeID

Each derivative is assigned a unique DerivativeID

indices
Link copied to clipboard
open val indices: Iterator<IntArray>

An iterator over the indices for the tensor

isScalar
Link copied to clipboard
open val isScalar: Boolean

True if the tensor is a scalar.

name
Link copied to clipboard
var name: String? = null
operations
Link copied to clipboard
open override val operations: Operations

The operations available on a tensor.

precomputedHashCode
Link copied to clipboard
val precomputedHashCode: Int
primal
Link copied to clipboard
open override val primal: DTensor

primal points to the actual tensor

rank
Link copied to clipboard
open val rank: Int

The number of dimensions in the tensor's shape. rank 0 - Scalar rank 1 - 1D array or 1D tensor rank 2 - 2D matrix or 2D tensor rank 3 - 3D tensor ... rank N - ND tensor

shape
Link copied to clipboard
open override val shape: Shape

shape indicates the number of dimension of a tensor and the length of each dimension. If the shape of the tensor is 3x4x5 then the value of shape is Shape(3,4,5).

size
Link copied to clipboard
open val size: Int

The total number of elements of this tensor.

traceId
Link copied to clipboard
val traceId: TraceId
varIndex
Link copied to clipboard
val varIndex: Int

Inheritors

Variable
Link copied to clipboard