A graph is a collection of buffers and nodes that together form a neural network. The graph is created from a json definition file. After creation, the contents of the graph can be loaded from or saved to disk.
More...
|
| Graph (CInfo cinfo) |
|
Context | GetContext () |
| Returns the context associated with the graph More...
|
|
Graph | DeepCopy () |
| Copies the internal structure of the graph into a new graph More...
|
|
Graph | Instance () |
| Creates a copy of this graph with all internal weights referenced to this graph. More...
|
|
unsafe void | BindComponentInputs (ComponentInputBinding[] bindings) |
| Binds the component inputs in the graph to the specified set of nodes. Any component inputs not included will be bound to buffer inputs. More...
|
|
void | CopyWeightsFrom (Graph graph, float percent=1.0f) |
| Copies the neuron layer weights from the specified graph into this graph. The specified graph must have the same exact structure as this graph. More...
|
|
void | SetRandomWeights () |
| Initialize the weights of all trainable layers to random values. More...
|
|
T | GetNode< T > (string name) |
| Returns the specified node as the specified type. Null is returned if the node is not found or is of a different type. More...
|
|
GraphNode | GetOutputNode (int index) |
| Returns an output node of the graph as a GraphNode. The nodes are ordered in the appearance in the graph definition or the order they were added manually. More...
|
|
void | AddNode (GraphNode node) |
| Adds a node to the graph. This will be considered an output node until a node connecting to this one is added to the graph. More...
|
|
float | GetWeightStandardDeviation () |
| Returns the average standard deviation of all trainable weights in the graph. More...
|
|
void | ResetNeuronLayers () |
| Calls Reset() on all trainable layers in the graph. This is only necessary for LSTM neuron layers. More...
|
|
void | StepNeuronLayers (bool autoReset=true) |
| Calls Step() on all trainable layers in the graph. This is only necessary for LSTM neuron layers. More...
|
|
SerializationResult | Load (string appendName=null) |
| Load this object from disk. More...
|
|
SerializationResult | Save (string appendName=null) |
| Save this object to disk. More...
|
|
SerializationResult | Serialize (MemoryBuffer buffer) |
| Write the contents of this object to a buffer. More...
|
|
SerializationResult | Serialize (out byte[] data) |
| Write the contents of this object to a byte array. More...
|
|
SerializationResult | Deserialize (MemoryBuffer buffer) |
| Fill this object with contents from a buffer. More...
|
|
SerializationResult | Deserialize (byte[] data) |
| Fill this object with contents from a byte array. More...
|
|
void | AddRef () |
| Increments the internal reference count on this object. It is not common to use this method directly. More...
|
|
void | Release () |
| Decrements the internal reference count on this object. It is not common to use this method directly. More...
|
|
void | Dispose () |
| Cleans up any internal state. It is not safe to use an object after it has been disposed. More...
|
|
A graph is a collection of buffers and nodes that together form a neural network. The graph is created from a json definition file. After creation, the contents of the graph can be loaded from or saved to disk.
When loading from a resource, two assets will try to load. One will be the resourceName + "Definition", which should be a json text asset. The other will be resourceName + "Data", which will be the graph data. The definition is required, but the data can be missing on creation.
Binds the component inputs in the graph to the specified set of nodes. Any component inputs not included will be bound to buffer inputs.
This should only be called once before first evaluation. It is not necessary to call this if the graph is used as a graph component or added as a standard graph model to a graph manager.
Called automatically by IGraphComponent upon creation.
Any created buffer inputs will have the name "[Comp Input Name]Buffer" and will be added to the graph. (Ex: "MyCompInput" would have a buffer "MyCompInputBuffer" that can be queried through normal means)
- Parameters
-