Dense
Densely-connected layer
Constructors
Dense
Link copied to clipboard
fun Dense(numInputs: Int, numOutputs: Int, random: Random, bias: Boolean = true, activation: Activation = defaultActivation, weightInit: (Shape, Random) -> FloatTensor = defaultInit(numInputs), biasInit: (Shape, Random) -> FloatTensor = defaultInit(numInputs))
Content copied to clipboard
Full public constructor
Dense
Link copied to clipboard
fun Dense(numInputs: Int, numOutputs: Int, activation: Activation, random: Random, weightInit: (Shape, Random) -> FloatTensor = defaultInit(numInputs), biasInit: (Shape, Random) -> FloatTensor = defaultInit(numInputs))
Content copied to clipboard
Convenience constructor where bias
is always true.
Types
Functions
extract Tangent
Link copied to clipboard
open override fun extractTangent(output: DTensor, extractor: (DTensor, DTensor) -> DTensor): TrainableComponent.Companion.Tangent
Content copied to clipboard
get Single Input
Link copied to clipboard
Helper to check that the layer was called with a single input. Returns that input if successful, else errors.
load
Link copied to clipboard
store
Link copied to clipboard
training Step
Link copied to clipboard
open override fun trainingStep(optim: Optimizer<*>, tangent: Trainable.Tangent): Dense
Content copied to clipboard
with Trainables
Link copied to clipboard