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 String |
outputKey |
protected SDVariable |
outputVar |
protected INDArray |
params |
protected Map<String,INDArray> |
paramTable |
protected SameDiff |
sameDiff |
epsilon, graph, inputs, inputVertices, outputVertex, outputVertices, vertexIndex, vertexName
Constructor and Description |
---|
SameDiffGraphVertex(SameDiffVertex config,
ComputationGraph graph,
String name,
int vertexIndex,
INDArray paramsView,
boolean initParams) |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInputs, isOutputVertex, setInputs, setOutputVertex
protected SameDiffVertex config
protected SameDiff sameDiff
protected SDVariable outputVar
protected ExternalErrorsFunction fn
protected String outputKey
protected Map<String,SDVariable> inputVars
protected INDArray params
protected INDArray gradients
public SameDiffGraphVertex(SameDiffVertex config, ComputationGraph graph, String name, int vertexIndex, INDArray paramsView, boolean initParams)
public String toString()
toString
in class BaseGraphVertex
public boolean hasLayer()
GraphVertex
Layer
object or notpublic Layer getLayer()
GraphVertex
GraphVertex.hasLayer()
== falsepublic INDArray doForward(boolean training, LayerWorkspaceMgr workspaceMgr)
GraphVertex
training
- if true: forward pass at training time. If false: forward pass at test timepublic Pair<Gradient,INDArray[]> doBackward(boolean tbptt, LayerWorkspaceMgr workspaceMgr)
GraphVertex
tbptt
- If true: do backprop using truncated BPTTpublic void setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
GraphVertex
public Pair<INDArray,MaskState> feedForwardMaskArrays(INDArray[] maskArrays, MaskState currentMaskState, int minibatchSize)
protected void doInit()
public void clearVertex()
GraphVertex
clearVertex
in interface GraphVertex
clearVertex
in class BaseGraphVertex
public Map<String,INDArray> paramTable(boolean backpropOnly)
GraphVertex
paramTable
in interface Trainable
paramTable
in interface GraphVertex
paramTable
in class BaseGraphVertex
backpropOnly
- If true: exclude unsupervised training parameterspublic TrainingConfig getConfig()
getConfig
in interface Trainable
getConfig
in class BaseGraphVertex
public INDArray params()
params
in interface Trainable
params
in class BaseGraphVertex
public INDArray getGradientsViewArray()
getGradientsViewArray
in interface Trainable
getGradientsViewArray
in class BaseGraphVertex
Copyright © 2018. All rights reserved.