public class ReverseTimeSeriesVertex extends BaseGraphVertex
Masks: The input might be masked (to allow for varying time series lengths in one minibatch). In this case the
present input (mask array = 1) will be reverted in place and the padding (mask array = 0) will be left untouched at
the same place. For a time series of length n, this would normally mean, that the first n time steps are reverted and
the following padding is left untouched, but more complex masks are supported (e.g. [1, 0, 1, 0, ...].
epsilon, graph, inputs, inputVertices, outputVertex, outputVertices, vertexIndex, vertexName
Constructor and Description |
---|
ReverseTimeSeriesVertex(ComputationGraph graph,
String name,
int vertexIndex,
String inputName) |
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray[]> |
doBackward(boolean tbptt,
LayerWorkspaceMgr workspaceMgr)
Do backward pass
|
org.nd4j.linalg.api.ndarray.INDArray |
doForward(boolean training,
LayerWorkspaceMgr workspaceMgr)
Do forward pass using the stored inputs
|
org.nd4j.linalg.primitives.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, setOutputVertices
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInputs, setInputs, setOutputVertex
public ReverseTimeSeriesVertex(ComputationGraph graph, String name, int vertexIndex, String inputName)
public boolean hasLayer()
GraphVertex
Layer
object or notpublic boolean isOutputVertex()
GraphVertex
public Layer getLayer()
GraphVertex
GraphVertex.hasLayer()
== falsepublic org.nd4j.linalg.api.ndarray.INDArray doForward(boolean training, LayerWorkspaceMgr workspaceMgr)
GraphVertex
training
- if true: forward pass at training time. If false: forward pass at test timepublic org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray[]> doBackward(boolean tbptt, LayerWorkspaceMgr workspaceMgr)
GraphVertex
tbptt
- If true: do backprop using truncated BPTTpublic void setBackpropGradientsViewArray(org.nd4j.linalg.api.ndarray.INDArray backpropGradientsViewArray)
GraphVertex
public org.nd4j.linalg.primitives.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 BaseGraphVertex
Copyright © 2018. All rights reserved.