public abstract class SameDiffOutputLayer extends AbstractSameDiffLayer
activationsVertexName()
for detailslabelsRequired()
for detailsAbstractSameDiffLayer.Builder<T extends AbstractSameDiffLayer.Builder<T>>
biasUpdater, gradientNormalization, gradientNormalizationThreshold, l1, l1Bias, l2, l2Bias, updater
constraints, iDropout, layerName
Modifier | Constructor and Description |
---|---|
protected |
SameDiffOutputLayer() |
Modifier and Type | Method and Description |
---|---|
abstract String |
activationsVertexName()
Output layers should terminate in a single scalar value (i.e., a score) - however, sometimes the output activations
(such as softmax probabilities) need to be returned.
|
abstract SDVariable |
defineLayer(SameDiff sameDiff,
SDVariable layerInput,
SDVariable labels,
Map<String,SDVariable> paramTable)
Define the output layer
|
Layer |
instantiate(NeuralNetConfiguration conf,
Collection<TrainingListener> trainingListeners,
int layerIndex,
INDArray layerParamsView,
boolean initializeParams) |
boolean |
labelsRequired()
Whether labels are required for calculating the score.
|
applyGlobalConfig, applyGlobalConfigToLayer, defineParameters, getL1ByParam, getL2ByParam, getLayerParams, getMemoryReport, getPreProcessorForInputType, getUpdaterByParam, initializeParameters, initializer, initWeights, isPretrain, isPretrainParam, paramReshapeOrder, setNIn
clone, getOutputType, initializeConstraints, resetLayerDefaultConfig, setPretrain
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGradientNormalization, getGradientNormalizationThreshold, getLayerName
public abstract SDVariable defineLayer(SameDiff sameDiff, SDVariable layerInput, SDVariable labels, Map<String,SDVariable> paramTable)
sameDiff
- SameDiff instancelayerInput
- Input to the layerlabels
- Labels variable (or null if labelsRequired()
returns falseparamTable
- Parameter table - keys as defined by AbstractSameDiffLayer.defineParameters(SDLayerParams)
public abstract String activationsVertexName()
public boolean labelsRequired()
public Layer instantiate(NeuralNetConfiguration conf, Collection<TrainingListener> trainingListeners, int layerIndex, INDArray layerParamsView, boolean initializeParams)
instantiate
in class AbstractSameDiffLayer
Copyright © 2018. All rights reserved.