public class SameDiffGraphVertex extends BaseGraphVertex
SameDiffVertex| Modifier and Type | Field and Description |
|---|---|
protected SameDiffVertex |
config |
protected ExternalErrorsFunction |
fn |
protected INDArray |
gradients |
protected Map<String,INDArray> |
gradTable |
protected Map<String,SDVariable> |
inputVars |
protected INDArray[] |
maskArrays |
protected String |
outputKey |
protected SDVariable |
outputVar |
protected INDArray |
params |
protected Map<String,INDArray> |
paramTable |
protected SameDiff |
sameDiff |
dataType, epsilon, graph, inputs, inputVertices, outputVertex, outputVertices, vertexIndex, vertexName| Constructor and Description |
|---|
SameDiffGraphVertex(SameDiffVertex config,
ComputationGraph graph,
String name,
int vertexIndex,
INDArray paramsView,
boolean initParams,
DataType dataType) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearVertex()
This method clears inpjut for this vertex
|
Pair<Gradient,INDArray[]> |
doBackward(boolean tbptt,
LayerWorkspaceMgr workspaceMgr)
Do backward pass
|
INDArray |
doForward(boolean training,
LayerWorkspaceMgr workspaceMgr)
Do forward pass using the stored inputs
|
protected void |
doInit() |
Pair<INDArray,MaskState> |
feedForwardMaskArrays(INDArray[] maskArrays,
MaskState currentMaskState,
int minibatchSize) |
TrainingConfig |
getConfig() |
INDArray |
getGradientsViewArray() |
Layer |
getLayer()
Get the Layer (if any).
|
boolean |
hasLayer()
Whether the GraphVertex contains a
Layer object or not |
INDArray |
params() |
Map<String,INDArray> |
paramTable(boolean backpropOnly)
Get the parameter table for the vertex
|
void |
setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
|
String |
toString() |
canDoBackward, canDoForward, clear, getEpsilon, getInputVertices, getNumInputArrays, getNumOutputConnections, getOutputVertices, getVertexIndex, getVertexName, isInputVertex, numParams, setEpsilon, setInput, setInputVertices, setLayerAsFrozen, setOutputVertices, updaterDivideByMinibatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInputs, isOutputVertex, setInputs, setOutputVertexprotected SameDiffVertex config
protected SameDiff sameDiff
protected SDVariable outputVar
protected ExternalErrorsFunction fn
protected String outputKey
protected Map<String,SDVariable> inputVars
protected INDArray[] maskArrays
protected INDArray params
protected INDArray gradients
public SameDiffGraphVertex(SameDiffVertex config, ComputationGraph graph, String name, int vertexIndex, INDArray paramsView, boolean initParams, DataType dataType)
public String toString()
toString in class BaseGraphVertexpublic 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)
protected void doInit()
public void clearVertex()
GraphVertexclearVertex in interface GraphVertexclearVertex in class BaseGraphVertexpublic Map<String,INDArray> paramTable(boolean backpropOnly)
GraphVertexparamTable in interface TrainableparamTable in interface GraphVertexparamTable in class BaseGraphVertexbackpropOnly - If true: exclude unsupervised training parameterspublic TrainingConfig getConfig()
getConfig in interface TrainablegetConfig in class BaseGraphVertexpublic INDArray params()
params in interface Trainableparams in class BaseGraphVertexpublic INDArray getGradientsViewArray()
getGradientsViewArray in interface TrainablegetGradientsViewArray in class BaseGraphVertexCopyright © 2020. All rights reserved.