ConstantWithGrad

case class ConstantWithGrad(value: STen, pd: STen) extends Constant

A variable whose parent is empty but whose partial derivative is defined

trait Serializable
trait Product
trait Equals
trait Constant
trait Variable
class Object
trait Matchable
class Any

Value members

Inherited methods

def *[S : Sc](other: Double): Variable
Inherited from:
Variable
def *[S : Sc](other: Variable): Variable
Inherited from:
Variable
def +[S : Sc](other: Double): Variable
Inherited from:
Variable
def +[S : Sc](other: Variable): Variable
Inherited from:
Variable
def -[S : Sc](other: Variable): Variable
Inherited from:
Variable
def /[S : Sc](other: Variable): Variable
Inherited from:
Variable
def argmax[S : Sc](dim: Long, keepDim: Boolean): Variable
Inherited from:
Variable
def assign[S : Sc](other: Variable): Variable
Inherited from:
Variable
def atan[S : Sc]: Variable
Inherited from:
Variable
def backprop(): Unit

Runs the backpropagation algorithm starting from this value

Runs the backpropagation algorithm starting from this value

Only meaningful if this is scalar i.e. the number of elements in the value tensor is 1.

Inherited from:
Variable
def binaryCrossEntropyWithLogitsLoss[S : Sc](target: STen, posWeights: Option[STen], reduction: Reduction): Variable
Inherited from:
Variable
def bmm[S : Sc](other: Variable): Variable
Inherited from:
Variable
def cast[S : Sc](precision: FloatingPointPrecision): Variable
Inherited from:
Variable
def cat[S : Sc](other: Variable, dim: Long): Variable
Inherited from:
Variable
def choleskyLower[S : Sc]: Variable
Inherited from:
Variable
def choleskySolve[S : Sc](factor: Variable, upper: Boolean): Variable
Inherited from:
Variable
def clamp[S : Sc](min: Variable, max: Variable): Variable
Inherited from:
Variable
def colSum[S : Sc]: Variable
Inherited from:
Variable
def cos[S : Sc]: Variable
Inherited from:
Variable
def cross[S : Sc](other: Variable, dim: Int): Variable
Inherited from:
Variable
def crossEntropy[S : Sc](other: Variable): Variable
Inherited from:
Variable
def debug[S : Sc](fun: (STen, Boolean, Boolean) => Unit): Variable
Inherited from:
Variable

Returns an other Variable wrapping the same value tensor, without any parent and with needsGrad=false.

Returns an other Variable wrapping the same value tensor, without any parent and with needsGrad=false.

Inherited from:
Variable
def diag[S : Sc](diagonal: Long): Variable
Inherited from:
Variable
def dropout[S : Sc](prob: Double, train: Boolean): Variable
Inherited from:
Variable
def euclideanDistance[S : Sc](b: Variable, dim: Int): Variable
Inherited from:
Variable
def exp[S : Sc]: Variable
Inherited from:
Variable
def expand[S : Sc](shape: List[Long]): Variable
Inherited from:
Variable
def expandAs[S : Sc](other: STen): Variable
Inherited from:
Variable
def flatten[S : Sc](startDim: Int, endDim: Int): Variable
Inherited from:
Variable
def flatten[S : Sc](startDim: Int): Variable
Inherited from:
Variable
def flatten[S : Sc]: Variable
Inherited from:
Variable
def flattenLastDimensions[S : Sc](dims: Int): Variable
Inherited from:
Variable
def gelu[S : Sc]: Variable
Inherited from:
Variable
def hardSwish[S : Sc]: Variable
Inherited from:
Variable
def indexAdd[S : Sc](index: Variable, dim: Int, maxIndex: Long): Variable
Inherited from:
Variable
def indexAddFromSource[S : Sc](index: Variable, dim: Int, source: Variable): Variable
Inherited from:
Variable
def indexFill[S : Sc](index: Variable, dim: Int, fillValue: Double): Variable
Inherited from:
Variable
def indexSelect[S : Sc](dim: Long, index: Variable): Variable
Inherited from:
Variable
def inv[S : Sc]: Variable
Inherited from:
Variable
def l1Loss[S : Sc](target: STen, reduction: Reduction): Variable
Inherited from:
Variable
def leakyRelu[S : Sc](negativeSlope: Double): Variable
Inherited from:
Variable
def log[S : Sc]: Variable
Inherited from:
Variable
def log1p[S : Sc]: Variable
Inherited from:
Variable
def logSoftMax[S : Sc](dim: Int): Variable
Inherited from:
Variable
def logdet[S : Sc]: Variable
Inherited from:
Variable
def makeBooleanMask[S : Sc](q: Long): Variable
Inherited from:
Variable
def maskFill[S : Sc](mask: Variable, fill: Double): Variable
Inherited from:
Variable
def maskSelect[S : Sc](mask: Variable): Variable
Inherited from:
Variable
def maximum[S : Sc](other: Variable): Variable
Inherited from:
Variable
def mean[S : Sc](dim: List[Int], keepDim: Boolean): Variable
Inherited from:
Variable
def mean[S : Sc](dim: List[Int]): Variable
Inherited from:
Variable
def minimum[S : Sc](other: Variable): Variable
Inherited from:
Variable
def mm[S : Sc](other: Variable): Variable
Inherited from:
Variable
def mseLoss[S : Sc](target: STen, reduction: Reduction): Variable
Inherited from:
Variable
def needsGrad: Boolean

Returns true if lamp.autograd.Variable.partialDerivative is defined.

Returns true if lamp.autograd.Variable.partialDerivative is defined.

Inherited from:
Variable
def nllLoss[S : Sc](target: STen, weights: STen, reduction: Reduction, ignore: Long): Variable
Inherited from:
Variable
def norm2[S : Sc](dim: List[Int], keepDim: Boolean): Variable
Inherited from:
Variable
def norm2[S : Sc](dim: List[Int]): Variable
Inherited from:
Variable
def normalize[S : Sc](dim: List[Int], eps: Double): Variable
Inherited from:
Variable
def oneHot[S : Sc](numClasses: Int): Variable
Inherited from:
Variable
final def op: Option[Op]
Inherited from:
Constant
def options[S : Sc]: STenOptions

Returns the tensor options of its value.

Returns the tensor options of its value.

Inherited from:
Variable
def pinv[S : Sc](rcond: Double): Variable
Inherited from:
Variable
def pow[S : Sc](exponent: Variable): Variable
Inherited from:
Variable
def pow[S : Sc](const: Double): Variable
Inherited from:
Variable
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def relu[S : Sc]: Variable
Inherited from:
Variable
def repeatInterleave[S : Sc](repeats: Variable, dim: Int): Variable
Inherited from:
Variable
def reshape[S : Sc](shape: List[Long]): Variable
Inherited from:
Variable
def rowSum[S : Sc]: Variable
Inherited from:
Variable
def scatterAdd[S : Sc](index: Variable, dim: Int, maxIndex: Long): Variable
Inherited from:
Variable
def select[S : Sc](dim: Long, index: Long): Variable
Inherited from:
Variable
def shape: List[Long]

Returns the shape of its value.

Returns the shape of its value.

Inherited from:
Variable
def sigmoid[S : Sc]: Variable
Inherited from:
Variable
def sin[S : Sc]: Variable
Inherited from:
Variable
def slice[S : Sc](dim: Long, start: Long, end: Long, step: Long): Variable
Inherited from:
Variable
def softplus[S : Sc](beta: Double, threshold: Double): Variable
Inherited from:
Variable
Inherited from:
Variable
def sum[S : Sc](dim: List[Int], keepDim: Boolean): Variable
Inherited from:
Variable
def sum[S : Sc]: Variable
Inherited from:
Variable
def swish1[S : Sc]: Variable
Inherited from:
Variable
def t[S : Sc]: Variable

Returns a new variable with the first two dimensions transposed.

Returns a new variable with the first two dimensions transposed.

Inherited from:
Variable
def tan[S : Sc]: Variable
Inherited from:
Variable
def tanh[S : Sc]: Variable
Inherited from:
Variable
def toDense[S : Sc]: Variable
Inherited from:
Variable
def toDoubleArray: Array[Double]
Inherited from:
Variable
def toLongArray: Array[Long]
Inherited from:
Variable
override def toString: String
Definition Classes
Variable -> Any
Inherited from:
Variable
def transpose[S : Sc](dim1: Int, dim2: Int): Variable

Returns a new variable with the respective dimensions transposed.

Returns a new variable with the respective dimensions transposed.

Inherited from:
Variable
def variance[S : Sc](dim: List[Int]): Variable
Inherited from:
Variable
def view[S : Sc](shape: List[Long]): Variable
Inherited from:
Variable

Returns an other Variable wrapping the same value tensor, without any parent and with needsGrad=true.

Returns an other Variable wrapping the same value tensor, without any parent and with needsGrad=true.

Inherited from:
Variable
def zeroGrad(): Unit

In place zeros out the partial derivative

In place zeros out the partial derivative

Inherited from:
Variable
def zipBackward(fn: (STen, STen) => Unit): (Variable, (STen, STen) => Unit)

Returns a pair of this instance and the supplied function

Returns a pair of this instance and the supplied function

Inherited from:
Variable

Concrete fields

val partialDerivative: Option[STen]

Inherited fields

val id: UUID

Returns unique, stable and random UUID.

Returns unique, stable and random UUID.

Inherited from:
Variable
val sizes: List[Long]

Returns the shape of its value.

Returns the shape of its value.

Inherited from:
Variable
lazy val wengert: Seq[Variable]

Returns the Wengert list

Returns the Wengert list

Inherited from:
Variable