Constant

class Constant(constantValue: Float) : Initializer

Initializer that generates tensors with constant values.

Constructors

Constant
Link copied to clipboard
fun Constant(constantValue: Float)

Creates a Constant initializer with a given constantValue.

Functions

apply
Link copied to clipboard
fun apply(fanIn: Int, fanOut: Int, tf: Ops, input: Operand<Float>, name: String): InitializerOperation

Adds an Assign Op to the graph to initialize a tensorflow variable as specified by the initializer.

initialize
Link copied to clipboard
open override fun initialize(fanIn: Int, fanOut: Int, tf: Ops, shape: Operand<Int>, name: String): Operand<Float>

Returns a Tensor object initialized as specified by the initializer.

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

Properties

constantValue
Link copied to clipboard
val constantValue: Float

Constant value to fill the tensor.