public class ReshapeVertex extends BaseGraphVertex
.reshape(new int[]{}) on the input array to the vertex and passing the new shape
to the next layer. ReshapeVertex also ensures the shape is valid for the backward pass.epsilon, graph, inputs, inputVertices, outputVertices, vertexIndex, vertexName| Constructor and Description |
|---|
ReshapeVertex(ComputationGraph graph,
String name,
int vertexIndex,
int[] newShape) |
ReshapeVertex(ComputationGraph graph,
String name,
int vertexIndex,
VertexIndices[] inputVertices,
VertexIndices[] outputVertices,
int[] newShape) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray[]> |
doBackward(boolean tbptt)
Do backward pass
|
org.nd4j.linalg.api.ndarray.INDArray |
doForward(boolean training)
Do forward pass using the stored inputs
|
Pair<org.nd4j.linalg.api.ndarray.INDArray,MaskState> |
feedForwardMaskArrays(org.nd4j.linalg.api.ndarray.INDArray[] maskArrays,
MaskState currentMaskState,
int minibatchSize) |
Layer |
getLayer()
Get the Layer (if any).
|
boolean |
hasLayer()
Whether the GraphVertex contains a
Layer object or not |
boolean |
isOutputVertex()
Whether the GraphVertex is an output vertex
|
void |
setBackpropGradientsViewArray(org.nd4j.linalg.api.ndarray.INDArray backpropGradientsViewArray)
|
String |
toString() |
canDoBackward, canDoForward, clear, clearVertex, getEpsilon, getInputVertices, getNumInputArrays, getNumOutputConnections, getOutputVertices, getVertexIndex, getVertexName, isInputVertex, setEpsilon, setInput, setInputVertices, setLayerAsFrozen, setOutputVerticesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInputs, setInputspublic ReshapeVertex(ComputationGraph graph, String name, int vertexIndex, int[] newShape)
public ReshapeVertex(ComputationGraph graph, String name, int vertexIndex, VertexIndices[] inputVertices, VertexIndices[] outputVertices, int[] newShape)
public boolean hasLayer()
GraphVertexLayer object or notpublic boolean isOutputVertex()
GraphVertexpublic Layer getLayer()
GraphVertexGraphVertex.hasLayer() == falsepublic org.nd4j.linalg.api.ndarray.INDArray doForward(boolean training)
GraphVertextraining - if true: forward pass at training time. If false: forward pass at test timepublic Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray[]> doBackward(boolean tbptt)
GraphVertextbptt - If true: do backprop using truncated BPTTpublic void setBackpropGradientsViewArray(org.nd4j.linalg.api.ndarray.INDArray backpropGradientsViewArray)
GraphVertexpublic Pair<org.nd4j.linalg.api.ndarray.INDArray,MaskState> feedForwardMaskArrays(org.nd4j.linalg.api.ndarray.INDArray[] maskArrays, MaskState currentMaskState, int minibatchSize)
public String toString()
toString in class BaseGraphVertexCopyright © 2017. All rights reserved.