public abstract class BaseGraphVertex extends java.lang.Object implements GraphVertex
| Modifier and Type | Field and Description | 
|---|---|
| protected org.nd4j.linalg.api.ndarray.INDArray | epsilon | 
| protected ComputationGraph | graph | 
| protected org.nd4j.linalg.api.ndarray.INDArray[] | inputs | 
| protected VertexIndices[] | inputVerticesA representation of the vertices that are inputs to this vertex (inputs during forward pass)
 Specifically, if inputVertices[X].getVertexIndex() = Y, and inputVertices[X].getVertexEdgeNumber() = Z
 then the Zth output of vertex Y is the Xth input to this vertex | 
| protected VertexIndices[] | outputVerticesA representation of the vertices that this vertex is connected to (outputs duing forward pass)
 Specifically, if outputVertices[X].getVertexIndex() = Y, and outputVertices[X].getVertexEdgeNumber() = Z
 then the output of this vertex (there is only one output) is connected to the Zth input of vertex Y | 
| protected int | vertexIndexThe index of this vertex | 
| protected java.lang.String | vertexName | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | BaseGraphVertex(ComputationGraph graph,
               java.lang.String name,
               int vertexIndex,
               VertexIndices[] inputVertices,
               VertexIndices[] outputVertices) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canDoBackward()Whether the GraphVertex can do backward pass. | 
| boolean | canDoForward()Whether the GraphVertex can do forward pass. | 
| void | clear()Clear the internal state (if any) of the GraphVertex. | 
| org.nd4j.linalg.api.ndarray.INDArray | getEpsilon()Get the epsilon/error (i.e., dL/dOutput) array previously set for this GraphVertex | 
| VertexIndices[] | getInputVertices()A representation of the vertices that are inputs to this vertex (inputs duing forward pass) Specifically, if inputVertices[X].getVertexIndex() = Y, and inputVertices[X].getVertexEdgeNumber() = Z then the Zth output of vertex Y is the Xth input to this vertex | 
| int | getNumInputArrays()Get the number of input arrays. | 
| int | getNumOutputConnections()Get the number of outgoing connections from this GraphVertex. | 
| VertexIndices[] | getOutputVertices()A representation of the vertices that this vertex is connected to (outputs duing forward pass)
 Specifically, if outputVertices[X].getVertexIndex() = Y, and outputVertices[X].getVertexEdgeNumber() = Z
 then the Xth output of this vertex is connected to the Zth input of vertex Y | 
| int | getVertexIndex()Get the index of the GraphVertex | 
| java.lang.String | getVertexName()Get the name/label of the GraphVertex | 
| boolean | isInputVertex()Whether the GraphVertex is an input vertex | 
| void | setEpsilon(org.nd4j.linalg.api.ndarray.INDArray epsilon)Set the errors (epsilon - aka dL/dActivation) for this GraphVertex | 
| void | setInput(int inputNumber,
        org.nd4j.linalg.api.ndarray.INDArray input)Set the input activations. | 
| void | setInputVertices(VertexIndices[] inputVertices)Sets the input vertices. | 
| void | setLayerAsFrozen()Only applies to layer vertices. | 
| void | setOutputVertices(VertexIndices[] outputVertices)set the output vertices. | 
| abstract java.lang.String | toString() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoBackward, doForward, feedForwardMaskArrays, getInputs, getLayer, hasLayer, isOutputVertex, setBackpropGradientsViewArray, setInputsprotected ComputationGraph graph
protected java.lang.String vertexName
protected int vertexIndex
protected VertexIndices[] inputVertices
protected VertexIndices[] outputVertices
protected org.nd4j.linalg.api.ndarray.INDArray[] inputs
protected org.nd4j.linalg.api.ndarray.INDArray epsilon
protected BaseGraphVertex(ComputationGraph graph, java.lang.String name, int vertexIndex, VertexIndices[] inputVertices, VertexIndices[] outputVertices)
public java.lang.String getVertexName()
GraphVertexgetVertexName in interface GraphVertexpublic int getVertexIndex()
GraphVertexgetVertexIndex in interface GraphVertexpublic int getNumInputArrays()
GraphVertexgetNumInputArrays in interface GraphVertexpublic int getNumOutputConnections()
GraphVertexgetNumOutputConnections in interface GraphVertexpublic VertexIndices[] getInputVertices()
getInputVertices in interface GraphVertexpublic void setInputVertices(VertexIndices[] inputVertices)
GraphVertexsetInputVertices in interface GraphVertexGraphVertex.getInputVertices()public VertexIndices[] getOutputVertices()
getOutputVertices in interface GraphVertexpublic void setOutputVertices(VertexIndices[] outputVertices)
GraphVertexsetOutputVertices in interface GraphVertexGraphVertex.getOutputVertices()public boolean isInputVertex()
GraphVertexisInputVertex in interface GraphVertexpublic void setInput(int inputNumber,
                     org.nd4j.linalg.api.ndarray.INDArray input)
GraphVertexsetInput in interface GraphVertexinputNumber - Must be in range 0 to GraphVertex.getNumInputArrays()-1input - The input arraypublic void setEpsilon(org.nd4j.linalg.api.ndarray.INDArray epsilon)
GraphVertexsetEpsilon in interface GraphVertexpublic void clear()
GraphVertexclear in interface GraphVertexpublic boolean canDoForward()
GraphVertexcanDoForward in interface GraphVertexpublic boolean canDoBackward()
GraphVertexcanDoBackward in interface GraphVertexpublic org.nd4j.linalg.api.ndarray.INDArray getEpsilon()
GraphVertexgetEpsilon in interface GraphVertexpublic abstract java.lang.String toString()
toString in class java.lang.Objectpublic void setLayerAsFrozen()
GraphVertexsetLayerAsFrozen in interface GraphVertex