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.dataType, epsilon, graph, inputs, inputVertices, outputVertex, outputVertices, vertexIndex, vertexName| Constructor and Description |
|---|
ReshapeVertex(ComputationGraph graph,
String name,
int vertexIndex,
char order,
int[] newShape,
int[] maskShape,
org.nd4j.linalg.api.buffer.DataType dataType) |
ReshapeVertex(ComputationGraph graph,
String name,
int vertexIndex,
VertexIndices[] inputVertices,
VertexIndices[] outputVertices,
char order,
int[] newShape,
int[] maskShape,
org.nd4j.linalg.api.buffer.DataType dataType) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Gradient,INDArray[]> |
doBackward(boolean tbptt,
LayerWorkspaceMgr workspaceMgr)
Do backward pass
|
INDArray |
doForward(boolean training,
LayerWorkspaceMgr workspaceMgr)
Do forward pass using the stored inputs
|
Pair<INDArray,MaskState> |
feedForwardMaskArrays(INDArray[] maskArrays,
MaskState currentMaskState,
int minibatchSize) |
Layer |
getLayer()
Get the Layer (if any).
|
boolean |
hasLayer()
Whether the GraphVertex contains a
Layer object or not |
void |
setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
|
String |
toString() |
canDoBackward, canDoForward, clear, clearVertex, getConfig, getEpsilon, getGradientsViewArray, getInputVertices, getNumInputArrays, getNumOutputConnections, getOutputVertices, getVertexIndex, getVertexName, isInputVertex, numParams, params, paramTable, setEpsilon, setInput, setInputVertices, setLayerAsFrozen, setOutputVertices, updaterDivideByMinibatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInputs, isOutputVertex, setInputs, setOutputVertexpublic ReshapeVertex(ComputationGraph graph, String name, int vertexIndex, char order, int[] newShape, int[] maskShape, org.nd4j.linalg.api.buffer.DataType dataType)
public ReshapeVertex(ComputationGraph graph, String name, int vertexIndex, VertexIndices[] inputVertices, VertexIndices[] outputVertices, char order, int[] newShape, int[] maskShape, org.nd4j.linalg.api.buffer.DataType dataType)
public boolean hasLayer()
GraphVertexLayer object or notpublic Layer getLayer()
GraphVertexGraphVertex.hasLayer() == falsepublic INDArray doForward(boolean training, LayerWorkspaceMgr workspaceMgr)
GraphVertextraining - if true: forward pass at training time. If false: forward pass at test timepublic Pair<Gradient,INDArray[]> doBackward(boolean tbptt, LayerWorkspaceMgr workspaceMgr)
GraphVertextbptt - If true: do backprop using truncated BPTTpublic void setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
GraphVertexpublic Pair<INDArray,MaskState> feedForwardMaskArrays(INDArray[] maskArrays, MaskState currentMaskState, int minibatchSize)
public String toString()
toString in class BaseGraphVertexCopyright © 2019. All rights reserved.