public class CapsuleLayer extends SameDiffLayer
| Modifier and Type | Class and Description |
|---|---|
static class |
CapsuleLayer.Builder |
weightInitbiasUpdater, gradientNormalization, gradientNormalizationThreshold, regularization, regularizationBias, updaterconstraints, iDropout, layerName| Constructor and Description |
|---|
CapsuleLayer(CapsuleLayer.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
defineLayer(SameDiff SD,
SDVariable input,
Map<String,SDVariable> paramTable,
SDVariable mask)
Define the layer
|
void |
defineParameters(SDLayerParams params)
Define the parameters for the network.
|
InputType |
getOutputType(int layerIndex,
InputType inputType)
For a given type of input to this layer, what is the type of the output?
|
void |
initializeParameters(Map<String,INDArray> params)
Set the initial parameter values for this layer, if required
|
void |
setNIn(InputType inputType,
boolean override)
Set the nIn value (number of inputs, or input channels for CNNs) based on the given input
type
|
feedForwardMaskArray, instantiate, validateInputapplyGlobalConfig, applyGlobalConfigToLayer, getLayerParams, getMemoryReport, getPreProcessorForInputType, getRegularizationByParam, getUpdaterByParam, initializer, initWeights, isPretrainParam, onesMaskForInput, paramReshapeOrderclone, initializeConstraints, resetLayerDefaultConfig, setDataTypeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGradientNormalization, getGradientNormalizationThreshold, getLayerNamepublic CapsuleLayer(CapsuleLayer.Builder builder)
public void setNIn(InputType inputType, boolean override)
LayersetNIn in class AbstractSameDiffLayerinputType - Input type for this layeroverride - If false: only set the nIn value if it's not already set. If true: set it
regardless of whether it's already set or not.public SDVariable defineLayer(SameDiff SD, SDVariable input, Map<String,SDVariable> paramTable, SDVariable mask)
SameDiffLayerdefineLayer in class SameDiffLayerSD - SameDiff instanceinput - Input to the layerparamTable - Parameter table - keys as defined by AbstractSameDiffLayer.defineParameters(SDLayerParams)mask - Optional, maybe null. Mask to apply if supportedpublic void defineParameters(SDLayerParams params)
AbstractSameDiffLayerSDLayerParams.addWeightParam(String, long...) and SDLayerParams.addBiasParam(String, long...)defineParameters in class AbstractSameDiffLayerparams - Object used to set parameters for this layerpublic void initializeParameters(Map<String,INDArray> params)
AbstractSameDiffLayerinitializeParameters in class AbstractSameDiffLayerparams - Parameter arrays that may be initializedpublic InputType getOutputType(int layerIndex, InputType inputType)
LayergetOutputType in class LayerlayerIndex - Index of the layerinputType - Type of input for the layerCopyright © 2019. All rights reserved.