public class KerasConstraintUtils extends Object
| Constructor and Description |
|---|
KerasConstraintUtils() |
| Modifier and Type | Method and Description |
|---|---|
static LayerConstraint |
getConstraintsFromConfig(Map<String,Object> layerConfig,
String constraintField,
KerasLayerConfiguration conf,
int kerasMajorVersion)
Get constraint initialization from Keras layer configuration.
|
static LayerConstraint |
mapConstraint(String kerasConstraint,
KerasLayerConfiguration conf,
Map<String,Object> constraintConfig)
Map Keras to DL4J constraint.
|
public static LayerConstraint mapConstraint(String kerasConstraint, KerasLayerConfiguration conf, Map<String,Object> constraintConfig) throws UnsupportedKerasConfigurationException
kerasConstraint - String containing Keras constraint nameconf - Keras layer configurationUnsupportedKerasConfigurationExceptionLayerConstraintpublic static LayerConstraint getConstraintsFromConfig(Map<String,Object> layerConfig, String constraintField, KerasLayerConfiguration conf, int kerasMajorVersion) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig - dictionary containing Keras layer configurationconstraintField - string in configuration representing parameter to constrainconf - Keras layer configurationkerasMajorVersion - Major keras version as integer (1 or 2)InvalidKerasConfigurationException - Invalid configurationUnsupportedKerasConfigurationException - Unsupported configurationCopyright © 2021. All rights reserved.