public class ReshapeVertex extends GraphVertex
CnnToFeedForwardPreProcessor and
FeedForwardToRnnPreProcessor for most cases.| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_RESHAPE_ORDER |
protected int[] |
maskShape |
protected int[] |
newShape |
protected char |
reshapeOrder |
| Constructor and Description |
|---|
ReshapeVertex(char reshapeOrder,
int[] newShape,
int[] maskShape) |
ReshapeVertex(int... newShape) |
| Modifier and Type | Method and Description |
|---|---|
ReshapeVertex |
clone() |
boolean |
equals(Object o) |
MemoryReport |
getMemoryReport(InputType... inputTypes)
This is a report of the estimated memory consumption for the given vertex
|
InputType |
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,
org.nd4j.linalg.api.ndarray.INDArray paramsView,
boolean initializeParams)
Create a
GraphVertex instance, for the given computation graph,
given the configuration instance. |
int |
maxVertexInputs() |
int |
minVertexInputs() |
int |
numParams(boolean backprop) |
public static final char DEFAULT_RESHAPE_ORDER
protected char reshapeOrder
protected int[] newShape
protected int[] maskShape
public ReshapeVertex(int... newShape)
public ReshapeVertex(char reshapeOrder,
int[] newShape,
int[] maskShape)
public ReshapeVertex clone()
clone in class GraphVertexpublic boolean equals(Object o)
equals in class GraphVertexpublic int hashCode()
hashCode in class GraphVertexpublic int numParams(boolean backprop)
numParams in class GraphVertexpublic int minVertexInputs()
minVertexInputs in class GraphVertexpublic int maxVertexInputs()
maxVertexInputs in class GraphVertexpublic GraphVertex instantiate(ComputationGraph graph, String name, int idx, org.nd4j.linalg.api.ndarray.INDArray paramsView, boolean initializeParams)
GraphVertexGraphVertex instance, for the given computation graph,
given the configuration instance.instantiate in class GraphVertexgraph - 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 arraypublic InputType getOutputType(int layerIndex, InputType... vertexInputs) throws InvalidInputTypeException
GraphVertexgetOutputType in class GraphVertexlayerIndex - The index of the layer (if appropriate/necessary).vertexInputs - The inputs to this vertexInvalidInputTypeException - If the input type is invalid for this type of GraphVertexpublic MemoryReport getMemoryReport(InputType... inputTypes)
GraphVertexgetMemoryReport in class GraphVertexinputTypes - Input types to the vertex. Memory consumption is often a function of the input typeCopyright © 2018. All rights reserved.