Graph and Symbol
ComputationGraph(API) is the basic computation model class.
All other computation model are based on this class.
A typical forward computation with
ComputationGraph like below:
let g = ComputationGraph() /// Add input and operators /// ... /// This only needs to be called before 1st forward g.forwardPrepare() let results = g.forward()
Below figure illustrates the forward process in
ComputationGraph forward computation, Serrano does not do any memory optimization.
ComputationGraph stores all inner results for each operator's output.
If you want to use less memory and only cares about a forward computation's final results,
you can use
ForwardGraph(API). Check guide here.