public class KerasDense extends KerasLayer
KerasLayer.DimOrderclassName, conf, dimOrder, dropout, inboundLayerNames, inputShape, kerasMajorVersion, layer, layerName, originalLayerConfig, outboundLayerNames, vertex, weightL1Regularization, weightL2Regularization, weights| Constructor and Description |
|---|
KerasDense(Integer kerasVersion)
Pass-through constructor from KerasLayer
|
KerasDense(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasDense(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
DenseLayer |
getDenseLayer()
Get DL4J DenseLayer.
|
int |
getNumParams()
Returns number of trainable parameters in layer.
|
InputType |
getOutputType(InputType... inputType)
Get layer output type.
|
void |
setWeights(Map<String,INDArray> weights)
Set weights for layer.
|
clearCustomLayers, clearLambdaLayers, copyWeightsToLayer, getClassName, getDimOrder, getInboundLayerNames, getInputPreprocessor, getInputShape, getKerasMajorVersion, getLayer, getLayerName, getNInFromConfig, getVertex, getWeights, isInputPreProcessor, isLayer, isValidInboundLayer, isVertex, registerCustomLayer, registerLambdaLayer, setInboundLayerNames, setLayer, usesRegularizationpublic KerasDense(Integer kerasVersion) throws UnsupportedKerasConfigurationException
kerasVersion - major keras versionUnsupportedKerasConfigurationException - Unsupported Keras configpublic KerasDense(Map<String,Object> layerConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig - dictionary containing Keras layer configurationInvalidKerasConfigurationException - Invalid Keras configUnsupportedKerasConfigurationException - Unsupported Keras configpublic KerasDense(Map<String,Object> layerConfig, boolean enforceTrainingConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig - dictionary containing Keras layer configurationenforceTrainingConfig - whether to enforce training-related configuration optionsInvalidKerasConfigurationException - Invalid Keras configUnsupportedKerasConfigurationException - Unsupported Keras configpublic DenseLayer getDenseLayer()
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
getOutputType in class KerasLayerinputType - Array of InputTypesInvalidKerasConfigurationException - Invalid Keras configpublic int getNumParams()
getNumParams in class KerasLayerpublic void setWeights(Map<String,INDArray> weights) throws InvalidKerasConfigurationException
setWeights in class KerasLayerweights - Dense layer weightsInvalidKerasConfigurationExceptionCopyright © 2021. All rights reserved.