Class AbstractActivation
java.lang.Object
org.tensorflow.framework.activations.AbstractActivation
- All Implemented Interfaces:
Activation
- Direct Known Subclasses:
ELU, Exponential, GELU, HardSigmoid, Linear, ReLU, SELU, Sigmoid, Softmax, Softplus, Softsign, Swish, Tanh
Abstract base class for Activations
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates the abstract class for an AbstractActivation -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckClassName(Map<String, Object> config) Verifies that the configuration is for the same Activation class.protected voidcheckConfigKeys(Set<String> keysToCheck, Set<String> allowedKeys) Verifies that any key in keysToCheck is also in the allowedKeys set.Gets a configuration mapgetDefaultConfig(String name) Gets a configuration map, this default implementation returns a singleton Map, withNAME_KEYas the key, and thenameparameter as its value;abstract StringgetName()Get the name of the activation as known by the TensorFlow Engineprotected OpsgetTF()Gets the TensorFlow Opsprotected voidSets the TensorFlow OpsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Activation
call
-
Field Details
-
NAME_KEY
- See Also:
-
tf
The TensorFlow Ops
-
-
Constructor Details
-
AbstractActivation
protected AbstractActivation()Creates the abstract class for an AbstractActivation
-
-
Method Details
-
getDefaultConfig
Gets a configuration map, this default implementation returns a singleton Map, withNAME_KEYas the key, and thenameparameter as its value;- Parameters:
name- the name of the Activation as known by TensorFlow engine.- Returns:
- the configuration map
-
getConfig
-
getName
Get the name of the activation as known by the TensorFlow Engine- Returns:
- the name of the activation as known by the TensorFlow Engine
-
getTF
-
setTF
-
checkConfigKeys
Verifies that any key in keysToCheck is also in the allowedKeys set.- Parameters:
keysToCheck- the set with keys to checkallowedKeys- the set to check against.- Throws:
IllegalArgumentException- if there is an entry in set1 that is not in set 2.
-
checkClassName
Verifies that the configuration is for the same Activation class.- Parameters:
config- the configuration- Throws:
IllegalArgumentException- if the value for the name key does not match the name for the Activation
-