From 56ee2c43d96c51868178b075e87124867784deb1 Mon Sep 17 00:00:00 2001 From: hyunil park Date: Wed, 4 Jan 2023 18:30:16 +0900 Subject: [PATCH] [API][trainer] Add train_complete to GstTensorTrainerFrameworkInfo To abvoid dead lock, g_cond_wait is determined by train_complete value when receive EOS. Signed-off-by: hyunil park --- gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h b/gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h index 19c8ac2..4ff99d9 100644 --- a/gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h +++ b/gst/nnstreamer/include/nnstreamer_plugin_api_trainer.h @@ -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; -- 2.7.4