Package org.deeplearning4j.nn.conf.graph
Class StackVertex
- java.lang.Object
-
- org.deeplearning4j.nn.conf.graph.GraphVertex
-
- org.deeplearning4j.nn.conf.graph.StackVertex
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class StackVertex extends GraphVertex
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StackVertex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackVertex
clone()
boolean
equals(Object o)
MemoryReport
getMemoryReport(InputType... inputTypes)
This is a report of the estimated memory consumption for the given vertexInputType
getOutputType(int layerIndex, InputType... vertexInputs)
Determine the type of output for this GraphVertex, given the specified inputs.int
hashCode()
GraphVertex
instantiate(ComputationGraph graph, String name, int idx, INDArray paramsView, boolean initializeParams, DataType networkDatatype)
Create aGraphVertex
instance, for the given computation graph, given the configuration instance.int
maxVertexInputs()
int
minVertexInputs()
long
numParams(boolean backprop)
String
toString()
-
Methods inherited from class org.deeplearning4j.nn.conf.graph.GraphVertex
setDataType
-
-
-
-
Method Detail
-
clone
public StackVertex clone()
- Specified by:
clone
in classGraphVertex
-
equals
public boolean equals(Object o)
- Specified by:
equals
in classGraphVertex
-
numParams
public long numParams(boolean backprop)
- Specified by:
numParams
in classGraphVertex
-
minVertexInputs
public int minVertexInputs()
- Specified by:
minVertexInputs
in classGraphVertex
- Returns:
- The Smallest valid number of inputs to this vertex
-
maxVertexInputs
public int maxVertexInputs()
- Specified by:
maxVertexInputs
in classGraphVertex
- Returns:
- The largest valid number of inputs to this vertex
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classGraphVertex
-
instantiate
public GraphVertex instantiate(ComputationGraph graph, String name, int idx, INDArray paramsView, boolean initializeParams, DataType networkDatatype)
Description copied from class:GraphVertex
Create aGraphVertex
instance, for the given computation graph, given the configuration instance.- Specified by:
instantiate
in classGraphVertex
- Parameters:
graph
- The computation graph that this GraphVertex is to be part ofname
- The name of the GraphVertex objectidx
- The index of the GraphVertexparamsView
- A view of the full parameters arrayinitializeParams
- If true: initialize the parameters. If false: make no change to the values in the paramsView array- Returns:
- The implementation GraphVertex object (i.e., implementation, no the configuration)
-
getOutputType
public InputType getOutputType(int layerIndex, InputType... vertexInputs) throws InvalidInputTypeException
Description copied from class:GraphVertex
Determine the type of output for this GraphVertex, given the specified inputs. Given that a GraphVertex may do arbitrary processing or modifications of the inputs, the output types can be quite different to the input type(s).
This is generally used to determine when to add preprocessors, as well as the input sizes etc for layers- Specified by:
getOutputType
in classGraphVertex
- Parameters:
layerIndex
- The index of the layer (if appropriate/necessary).vertexInputs
- The inputs to this vertex- Returns:
- The type of output for this vertex
- Throws:
InvalidInputTypeException
- If the input type is invalid for this type of GraphVertex
-
getMemoryReport
public MemoryReport getMemoryReport(InputType... inputTypes)
Description copied from class:GraphVertex
This is a report of the estimated memory consumption for the given vertex- Specified by:
getMemoryReport
in classGraphVertex
- Parameters:
inputTypes
- Input types to the vertex. Memory consumption is often a function of the input type- Returns:
- Memory report for the vertex
-
-