Doxygen Book
nnstreamer_plugin_api_trainer.h File Reference

Mandatory APIs for NNStreamer Trainer sub-plugins (No External Dependencies) More...

#include "tensor_typedef.h"
Include dependency graph for nnstreamer_plugin_api_trainer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GstTensorTrainerProperties
 GstTensorTrainer's properties for neural network framework (internal data structure) More...
 
struct  _GstTensorTrainerFrameworkInfo
 GstTensorTrainer's subplugin framework related information. More...
 
struct  _GstTensorTrainerEventNotifier
 GstTensorTrainer's event notifier. More...
 
struct  _GstTensorTrainerFramework
 tensor_trainer subplugin definition More...
 

Macros

#define GST_TENSOR_TRAINER_FRAMEWORK_BASE   (0xDEAFDEAD00000000ULL)
 
#define GST_TENSOR_TRAINER_FRAMEWORK_V1   (GST_TENSOR_TRAINER_FRAMEWORK_BASE | 0x10000ULL)
 

Typedefs

typedef struct _GstTensorTrainerProperties GstTensorTrainerProperties
 GstTensorTrainer's properties for neural network framework (internal data structure) More...
 
typedef struct _GstTensorTrainerFrameworkInfo GstTensorTrainerFrameworkInfo
 GstTensorTrainer's subplugin framework related information. More...
 
typedef struct _GstTensorTrainerFramework GstTensorTrainerFramework
 
typedef struct _GstTensorTrainerEventNotifier GstTensorTrainerEventNotifier
 GstTensorTrainer's event notifier. More...
 

Enumerations

enum  GstTensorTrainerEventType { TRAINER_EVENT_EPOCH_COMPLETION, TRAINER_EVENT_TRAINING_COMPLETION, TRAINER_EVENT_UNKNOWN }
 GstTensorTrainer's event type list. More...
 

Functions

int nnstreamer_trainer_probe (GstTensorTrainerFramework *ttsp)
 Trainer's sub-plugin should call this function to register itself. More...
 
int nnstreamer_trainer_exit (GstTensorTrainerFramework *ttsp)
 Trainer's sub-plugin may call this to unregister itself. More...
 
void nnstreamer_trainer_notify_event (GstTensorTrainerEventNotifier *notifier, GstTensorTrainerEventType type, void *data)
 Trainer's sub-plugin call this to notify event. More...
 

Detailed Description

Mandatory APIs for NNStreamer Trainer sub-plugins (No External Dependencies)

NNStreamer API for Tensor_Trainer Sub-Plugins Copyright (C) 2022 Hyunil Park hyuni.nosp@m.l46..nosp@m.park@.nosp@m.sams.nosp@m.ung.c.nosp@m.om

Date
1 Dec 2022
See also
https://github.com/nnstreamer/nnstreamer
Author
Hyunil Park hyuni.nosp@m.l46..nosp@m.park@.nosp@m.sams.nosp@m.ung.c.nosp@m.om
Bug:
No known bugs except for NYI items

Definition in file nnstreamer_plugin_api_trainer.h.

Macro Definition Documentation

◆ GST_TENSOR_TRAINER_FRAMEWORK_BASE

#define GST_TENSOR_TRAINER_FRAMEWORK_BASE   (0xDEAFDEAD00000000ULL)

Definition at line 19 of file nnstreamer_plugin_api_trainer.h.

◆ GST_TENSOR_TRAINER_FRAMEWORK_V1

#define GST_TENSOR_TRAINER_FRAMEWORK_V1   (GST_TENSOR_TRAINER_FRAMEWORK_BASE | 0x10000ULL)

Definition at line 20 of file nnstreamer_plugin_api_trainer.h.

Typedef Documentation

◆ GstTensorTrainerEventNotifier

GstTensorTrainer's event notifier.

Subplugins must send events to tensor_trainer with a notifier.

◆ GstTensorTrainerFramework

◆ GstTensorTrainerFrameworkInfo

GstTensorTrainer's subplugin framework related information.

All the information is provided statically.

◆ GstTensorTrainerProperties

GstTensorTrainer's properties for neural network framework (internal data structure)

Internal data of GstTensorTrainer required by tensor_trainer's custom subplugin.

Enumeration Type Documentation

◆ GstTensorTrainerEventType

GstTensorTrainer's event type list.

Event types that subplugins must send to tensor_trainer

Enumerator
TRAINER_EVENT_EPOCH_COMPLETION 

one epoch is complete in subplugin

TRAINER_EVENT_TRAINING_COMPLETION 

training is complete in subplugin

TRAINER_EVENT_UNKNOWN 

unknown event

Definition at line 67 of file nnstreamer_plugin_api_trainer.h.

Function Documentation

◆ nnstreamer_trainer_exit()

int nnstreamer_trainer_exit ( GstTensorTrainerFramework ttsp)

Trainer's sub-plugin may call this to unregister itself.

Parameters
[in]ttsptensor_trainer sub-plugin to be unregistered.
Returns
TRUE if unregistered. FALSE is failed.

Definition at line 1398 of file gsttensor_trainer.c.

Here is the call graph for this function:

◆ nnstreamer_trainer_notify_event()

void nnstreamer_trainer_notify_event ( GstTensorTrainerEventNotifier notifier,
GstTensorTrainerEventType  type,
void *  data 
)

Trainer's sub-plugin call this to notify event.

Parameters
notifiersub-plugin must send events to tensor_trainer with a notifier.
typeEvent types that subplugins must send to tensor_trainer
dataOptional data for the event

Trainer's sub-plugin call this to notify event.

Parameters
[in]notifierevent notifier, sub-plugin must send events with this.
[in]typeevent type

Definition at line 1425 of file gsttensor_trainer.c.

◆ nnstreamer_trainer_probe()

int nnstreamer_trainer_probe ( GstTensorTrainerFramework ttsp)

Trainer's sub-plugin should call this function to register itself.

Parameters
[in]ttsptensor_trainer sub-plugin to be registered.
Returns
TRUE if registered. FALSE is failed.
Note
Do not change the subplugins callbacks after probing the filter.
Parameters
[in]ttsptensor_trainer sub-plugin to be registered.
Returns
TRUE if registered. FALSE is failed or duplicated.

Definition at line 1371 of file gsttensor_trainer.c.

Here is the call graph for this function: