[API][trainer] Add train_complete to GstTensorTrainerFrameworkInfo
authorhyunil park <hyunil46.park@samsung.com>
Wed, 4 Jan 2023 09:30:16 +0000 (18:30 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 12 Jan 2023 10:25:29 +0000 (19:25 +0900)
To abvoid dead lock, g_cond_wait is determined by train_complete value
when receive EOS.

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h

index 19c8ac2..4ff99d9 100644 (file)
@@ -38,7 +38,7 @@ typedef struct _GstTensorTrainerProperties
   int64_t num_train_samples;    /**< The number of train sample used to train the model. */
   int64_t num_valid_samples;    /**< The number of valid sample used to train the model. */
 
-  GCond *train_complete_cond;    /**< Tensor trainer wait when receive EOS before model training is complete, subplugin should send signal when model train is complete */
+  GCond *train_complete_cond;    /**< Tensor trainer wait when receive EOS before model training is complete, subplugin should send signal when model train is complete. */
 } GstTensorTrainerProperties;
 
 /**
@@ -49,6 +49,7 @@ typedef struct _GstTensorTrainerProperties
 typedef struct _GstTensorTrainerFrameworkInfo
 {
   const char *name;    /**< Name of the neural network framework, searchable by FRAMEWORK property. */
+  gboolean  train_complete;  /**< Check if train is complete */
 } GstTensorTrainerFrameworkInfo;
 
 typedef struct _GstTensorTrainerFramework GstTensorTrainerFramework;