Input
classin packageklyn.math.nn.layers
public class Input<T extends AbstractFloat = Float> extends Layer<T>
Input

Declares and validates sample dimensions, excluding the batch axis. It has no parameters and returns the original input without copying.

Example

inputLayer = Input<Float>((28, 28))

Properties
Modifier and Type Member Description
public override readonly property displayName
displayName as String
Summary label.
public override readonly property inputShapeHint
inputShapeHint as IList<Long>
Declared sample dimensions.
public override readonly property parameterCount
parameterCount as ULong
Number of trainable parameters is zero.
Constructors
Modifier and Type Member Description
public Input
Input(shape as IList<Long>)
Declares dimensions supplied as a typed list, copied once.
public Input
Input(shape as Tuple)
Declares a positive tuple of sample dimensions.
Methods
Modifier and Type Member Description
public override buildShape
buildShape(inputShape as IList<Long>) as IList<Long>
Requires an exact match to the declared sample shape.
public override differentiate
differentiate(inputs as NDArray<T>, upstream as NDArray<T>) as LayerGradients<T>
Propagates the derivative unchanged.
public override forward
forward(inputs as NDArray<T>) as NDArray<T>
Validates and returns the same tensor, without allocation of element storage.
public override parameter
parameter(index as Long) as NDArray<T>
Rejects parameter access.