|
Public Member Functions |
| | otTinn () |
| | Create an empty neural-network object.
|
| bool | init (int nips, int nops, int nhid, otFILE *fs=0) |
| | Initialize the neural network.
|
| bool | init (const otNNTopology &topology, otFILE *fs=0) |
| | Initialize from the generic topology descriptor.
|
| void | topology (otNNTopology &out) const |
| bool | warmStartFrom (const otTinn &source, otTinnWarmStartReport &report) |
| | Initialize this already-allocated model from a trained source model.
|
| void | close () |
| | Free all allocated resources.
|
| float * | predict (const float *in) |
| | Return an output prediction for an input vector.
|
| void | setQ15MemoryPolicy (otTinnMemoryPolicy policy) |
| | Select how prepareQ15() places its runtime buffers.
|
| otTinnMemoryPolicy | q15MemoryPolicy () const |
| | Return the currently selected Q15 memory policy.
|
| otTinnMemoryMode | q15MemoryMode () const |
| | Return the effective memory mode selected by the last prepareQ15().
|
| const char * | q15MemoryModeName () const |
| | Human-readable effective Q15 memory mode.
|
| void | q15MemoryInfo (otTinnQ15MemoryInfo &info) const |
| | Fill a stable snapshot of the Q15 memory state.
|
| unsigned long | q15FastBytes () const |
| | Requested payload bytes placed in fast / normal memory.
|
| unsigned long | q15NormalBytes () const |
| unsigned long | q15RequiredBytes () const |
| int | q15WeightsBank () const |
| | Actual bank used by each Q15 runtime buffer: 0=normal, 1/2=fast bank.
|
| int | q15InputBank () const |
| int | q15HiddenBank () const |
| int | q15OutputBank () const |
| bool | prepareQ15 () |
| | Build the Q15 inference representation from the current float weights.
|
| void | releaseQ15 () |
| | Release the optional Q15 runtime buffers.
|
| bool | q15Ready () const |
| | Return whether a current Q15 representation is available.
|
| bool | quantizeInputQ15 (const float *in, short *outQ15) const |
| | Quantize one normalized float input vector to Q15.
|
| const short * | predictQ15Raw (const short *inQ15) |
| | Run the pure fixed-point Q15 inference core.
|
| float * | predictQ15 (const float *in) |
| | Compatibility wrapper accepting float input and returning float output.
|
| float | train (const float *in, const float *tg, float rate) |
| | Train the network with one input/target pair.
|
| bool | save (const char *path) |
| | Save the neural network using the historical text format.
|
| bool | load (const char *path) |
| | Load a neural network saved in the historical text format.
|
| bool | saveTrainingCheckpoint (const char *path) |
| | Save an exact training-checkpoint representation of the float model.
|
| bool | loadTrainingCheckpoint (const char *path) |
| | Load an exact model previously written by saveTrainingCheckpoint().
|
| void | print (const float *arr, const int size) |
| | Print an array of floats. Useful for inspecting predictions.
|
| void | properties (int &nips, int &nops, int &nhid) const |
| | Read the network dimensions.
|
| bool | valid () const |
| | Check whether all required network buffers are allocated.
|
Static Public Member Functions |
| static void | makeSingleHiddenTopology (otNNTopology &topology, int nips, int nops, int nhid) |
| static bool | topologyStructurallyValid (const otNNTopology &topology) |
| static bool | supportsTopology (const otNNTopology &topology) |
| static bool | supportsTrainingTopology (const otNNTopology &topology) |
| static bool | supportsQ15Topology (const otNNTopology &topology) |
| static bool | supportsLegacySerializationTopology (const otNNTopology &topology) |
| static bool | supportsTrainingCheckpointTopology (const otNNTopology &topology) |