Class L2NormalizeVertex
- java.lang.Object
-
- org.deeplearning4j.nn.graph.vertex.BaseGraphVertex
-
- org.deeplearning4j.nn.graph.vertex.impl.L2NormalizeVertex
-
- All Implemented Interfaces:
Serializable
,Trainable
,GraphVertex
public class L2NormalizeVertex extends BaseGraphVertex
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.nn.graph.vertex.BaseGraphVertex
dataType, epsilon, graph, inputs, inputVertices, outputVertex, outputVertices, vertexIndex, vertexName
-
-
Constructor Summary
Constructors Constructor Description L2NormalizeVertex(ComputationGraph graph, String name, int vertexIndex, int[] dimension, double eps, DataType dataType)
L2NormalizeVertex(ComputationGraph graph, String name, int vertexIndex, VertexIndices[] inputVertices, VertexIndices[] outputVertices, int[] dimension, double eps, DataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Gradient,INDArray[]>
doBackward(boolean tbptt, LayerWorkspaceMgr workspaceMgr)
Do backward passINDArray
doForward(boolean training, LayerWorkspaceMgr workspaceMgr)
Do forward pass using the stored inputsPair<INDArray,MaskState>
feedForwardMaskArrays(INDArray[] maskArrays, MaskState currentMaskState, int minibatchSize)
Layer
getLayer()
Get the Layer (if any).boolean
hasLayer()
Whether the GraphVertex contains aLayer
object or notvoid
setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
String
toString()
-
Methods inherited from class org.deeplearning4j.nn.graph.vertex.BaseGraphVertex
canDoBackward, canDoForward, clear, clearVertex, getConfig, getEpsilon, getGradientsViewArray, getInputVertices, getNumInputArrays, getNumOutputConnections, getOutputVertices, getVertexIndex, getVertexName, isInputVertex, numParams, params, paramTable, setEpsilon, setInput, setInputVertices, setLayerAsFrozen, setOutputVertices, updaterDivideByMinibatch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.deeplearning4j.nn.graph.vertex.GraphVertex
getInputs, isOutputVertex, setInputs, setOutputVertex
-
-
-
-
Constructor Detail
-
L2NormalizeVertex
public L2NormalizeVertex(ComputationGraph graph, String name, int vertexIndex, int[] dimension, double eps, DataType dataType)
-
L2NormalizeVertex
public L2NormalizeVertex(ComputationGraph graph, String name, int vertexIndex, VertexIndices[] inputVertices, VertexIndices[] outputVertices, int[] dimension, double eps, DataType dataType)
-
-
Method Detail
-
hasLayer
public boolean hasLayer()
Description copied from interface:GraphVertex
Whether the GraphVertex contains aLayer
object or not
-
getLayer
public Layer getLayer()
Description copied from interface:GraphVertex
Get the Layer (if any). Returns null ifGraphVertex.hasLayer()
== false
-
doForward
public INDArray doForward(boolean training, LayerWorkspaceMgr workspaceMgr)
Description copied from interface:GraphVertex
Do forward pass using the stored inputs- Parameters:
training
- if true: forward pass at training time. If false: forward pass at test time- Returns:
- The output (for example, activations) of the GraphVertex
-
doBackward
public Pair<Gradient,INDArray[]> doBackward(boolean tbptt, LayerWorkspaceMgr workspaceMgr)
Description copied from interface:GraphVertex
Do backward pass- Parameters:
tbptt
- If true: do backprop using truncated BPTT- Returns:
- The gradients (may be null), and the errors/epsilons for all inputs to this GraphVertex
-
setBackpropGradientsViewArray
public void setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
Description copied from interface:GraphVertex
-
feedForwardMaskArrays
public Pair<INDArray,MaskState> feedForwardMaskArrays(INDArray[] maskArrays, MaskState currentMaskState, int minibatchSize)
-
toString
public String toString()
- Specified by:
toString
in classBaseGraphVertex
-
-