Doxygen Book
gsttensor_trainer.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-only */
13 #ifndef __GST_TENSOR_TRAINER_H__
14 #define __GST_TENSOR_TRAINER_H__
15 
16 
17 #include <gst/gst.h>
18 #include <tensor_typedef.h>
19 #include <tensor_common.h>
20 
23 
24 G_BEGIN_DECLS
25 
26 #define GST_TYPE_TENSOR_TRAINER \
27  (gst_tensor_trainer_get_type())
28 #define GST_TENSOR_TRAINER(obj) \
29  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TENSOR_TRAINER,GstTensorTrainer))
30 #define GST_TENSOR_TRAINER_CLASS(klass) \
31  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TENSOR_TRAINER,GstTensorTrainerClass))
32 #define GST_IS_TENSOR_TRAINER(obj) \
33  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_TRAINER))
34 #define GST_IS_TENSOR_TRAINER_CLASS(klass) \
35  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_TRAINER))
36 
39 
44 {
45  GstElement element;
47  GstPad *sinkpad;
48  GstPad *srcpad;
49 
50  gchar *fw_name;
51 
52  gboolean fw_created;
55 
60 
64  void *privateData;
73 
74  GThread *dummy_data_thread;
75 };
76 
81 {
82  GstElementClass parent_class;
83 };
84 
88 GType gst_tensor_trainer_get_type (void);
89 
90 G_END_DECLS
91 
92 #endif /* __GST_TENSOR_TRAINER_H__ */
_GstTensorTrainer::notifier
GstTensorTrainerEventNotifier notifier
Definition: gsttensor_trainer.h:67
_GstTensorTrainer::privateData
void * privateData
Definition: gsttensor_trainer.h:64
NNS_TENSOR_SIZE_LIMIT
#define NNS_TENSOR_SIZE_LIMIT
The number of tensors NNStreamer supports is 256. The max memories of gst-buffer is 16 (See NNS_TENSO...
Definition: tensor_typedef.h:42
_GstTensorTrainer::is_training_complete
gboolean is_training_complete
Definition: gsttensor_trainer.h:53
_GstTensorTrainer::dummy_data_thread
GThread * dummy_data_thread
Definition: gsttensor_trainer.h:74
GstTensorsInfo
Internal meta data exchange format for a other/tensors instance.
Definition: tensor_typedef.h:273
_GstTensorTrainer::in_config
GstTensorsConfig in_config
Definition: gsttensor_trainer.h:59
_GstTensorTrainer::is_epoch_complete
gboolean is_epoch_complete
Definition: gsttensor_trainer.h:54
_GstTensorTrainer::training_completion_lock
GMutex training_completion_lock
Definition: gsttensor_trainer.h:69
_GstTensorTrainer::epoch_completion_lock
GMutex epoch_completion_lock
Definition: gsttensor_trainer.h:71
GstTensorMemory
The unit of each data tensors. It will be used as an input/output tensor of other/tensors.
Definition: tensor_typedef.h:252
nnstreamer_plugin_api_util.h
Optional/Additional NNStreamer APIs for sub-plugin writers. (No GStreamer dependency)
_GstTensorTrainer
GstTensorTrainer data structure.
Definition: gsttensor_trainer.h:43
_GstTensorTrainer::epoch_completion_cond
GCond epoch_completion_cond
Definition: gsttensor_trainer.h:72
_GstTensorTrainer::out_config
GstTensorsConfig out_config
Definition: gsttensor_trainer.h:58
_GstTensorTrainer::training_completion_cond
GCond training_completion_cond
Definition: gsttensor_trainer.h:70
_GstTensorTrainer::element
GstElement element
Definition: gsttensor_trainer.h:45
_GstTensorTrainer::required_sample
guint required_sample
Definition: gsttensor_trainer.h:61
_GstTensorTrainerFramework
tensor_trainer subplugin definition
Definition: nnstreamer_plugin_api_trainer.h:95
_GstTensorTrainer::output_meta
GstTensorsInfo output_meta
Definition: gsttensor_trainer.h:57
nnstreamer_plugin_api_trainer.h
Mandatory APIs for NNStreamer Trainer sub-plugins (No External Dependencies)
_GstTensorTrainer::input_tensors
GstTensorMemory input_tensors[NNS_TENSOR_SIZE_LIMIT]
Definition: gsttensor_trainer.h:56
GstTensorsConfig
Internal data structure for configured tensors info (for other/tensors).
Definition: tensor_typedef.h:284
gst_tensor_trainer_get_type
GType gst_tensor_trainer_get_type(void)
Function to get type of tensor_trainer.
_GstTensorTrainer::fw_name
gchar * fw_name
Definition: gsttensor_trainer.h:50
_GstTensorTrainer::sinkpad
GstPad * sinkpad
Definition: gsttensor_trainer.h:47
tensor_typedef.h
Common header file for NNStreamer, the GStreamer plugin for neural networks.
_GstTensorTrainer::fw_created
gboolean fw_created
Definition: gsttensor_trainer.h:52
_GstTensorTrainerClass
GstTensorTrainerClass data structure.
Definition: gsttensor_trainer.h:80
_GstTensorTrainer::cur_epoch_data_cnt
guint cur_epoch_data_cnt
Definition: gsttensor_trainer.h:62
tensor_common.h
Common header file for NNStreamer, the GStreamer plugin for neural networks.
_GstTensorTrainer::srcpad
GstPad * srcpad
Definition: gsttensor_trainer.h:48
_GstTensorTrainerClass::parent_class
GstElementClass parent_class
Definition: gsttensor_trainer.h:82
_GstTensorTrainerEventNotifier
GstTensorTrainer's event notifier.
Definition: nnstreamer_plugin_api_trainer.h:79
_GstTensorTrainer::prop
GstTensorTrainerProperties prop
Definition: gsttensor_trainer.h:66
_GstTensorTrainer::fw
const GstTensorTrainerFramework * fw
Definition: gsttensor_trainer.h:65
_GstTensorTrainerProperties
GstTensorTrainer's properties for neural network framework (internal data structure)
Definition: nnstreamer_plugin_api_trainer.h:31