ANeuralNetworksModel

ANeuralNetworksModel is an opaque type that contains a description of the mathematical operations that constitute the model.

<p>Build the model by calling<ul> <li>{@link ANeuralNetworksModel_create}</li> <li>{@link ANeuralNetworksModel_addOperation}</li> <li>{@link ANeuralNetworksModel_addOperand}</li> </ul>

This forms a graph in which each operation and operand is a node, a directed edge from an operand to an operation indicates that the operand is an input to the operation, and a directed edge from an operation to an operand indicates that the operand is an output from the operation. This graph must be acyclic.

A model is completed by calling {@link ANeuralNetworksModel_finish}. A model is destroyed by calling {@link ANeuralNetworksModel_free}.

<p>A model cannot be modified once {@link ANeuralNetworksModel_finish} has been called on it.</p>

<p>It is the application's responsibility to make sure that only one thread modifies a model at a given time. It is however safe for more than one thread to use the model once {@link ANeuralNetworksModel_finish} has returned.</p>

<p>It is also the application's responsibility to ensure that there are no other uses of the model after calling {@link ANeuralNetworksModel_free}. This includes any compilation or execution object created using the model.</p>

Available since API level 27.

version(Android)
extern (C) @system nothrow @nogc
struct ANeuralNetworksModel

Meta