Package deepboof.graph
Class FunctionSequence<T extends Tensor<T>,F extends Function<T>>
java.lang.Object
deepboof.graph.FunctionSequence<T,F>
Processes a sequence of forward functions. Any non-cyclical graph with a single
input and a single output can be processed by this function. The list of functions passed in to the constructor
is assumed to have already been ordered.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNodeOutput(int index) int[]voidinitialize(int[] inputShape) Initialize and declare memory for all nodes in the network given the shape of the input tensorvoidProcess the input tensor and compute the output tensor by feeding the results through the network.voidsetParameters(Map<String, List<T>> nodeParameters) Specify the parameters for each node in the network
-
Field Details
-
sequence
-
lookup
-
outputStorage
-
factory
-
-
Constructor Details
-
FunctionSequence
Configures the sequence- Parameters:
sequence- Sequence of functions which has been ordered to meet pre-requisites.type- Type of tensor
-
-
Method Details
-
initialize
public void initialize(int[] inputShape) Initialize and declare memory for all nodes in the network given the shape of the input tensor- Parameters:
inputShape- Shape of input tensor.
-
setParameters
Specify the parameters for each node in the network- Parameters:
nodeParameters- Map where the key is the function/node name and the value is the parameters for that node
-
process
Process the input tensor and compute the output tensor by feeding the results through the network. Must callinitialize(int[])once with the same shape as the input tensor. Must also callsetParameters(java.util.Map<java.lang.String, java.util.List<T>>)- Parameters:
input- Input tensoroutput- Storage for output tensor.
-
getSequence
-
getNodeOutput
-
getOutputShape
public int[] getOutputShape() -
getTensorType
-