-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onert] Let's remove default value from onert_train/args #12520
Comments
@Samsung/one_onert Could you briefly check draft #12445 and leave any opinion about the change? |
👍 |
I asked @Samsung/one_onert opinion through another channel. There are some opinions like :
Conclusion : #12525 (upgrading boost version) merged and it looks fine. So, There is no big problem to proceeding the draft i suggested #12445. |
TODO
|
What happened this issue? 😆 |
@zetwhite linked each PR to this issue using a comment like this |
Now, onert_train runs with below policy:
|
Background
Motivation1
For now,
onert_train
can set training info in 2 ways.Since command line input always has a default value,
onert_train
always choose to use the cmd line info instead of choosing the model file's.So, Let's
Motivation2
While working on motivation1, I found out that
onert_train/args
just save an integer valueonert_train
main does parsing - from an integer value to the corresponding enumNNFW_TRAIN_*
.Since
onert_train/args
holds an integer value, It is hard to remove the default value. More exactly, it is hard to represent that 'nothing is given'.Additionally parsing (integer to NNfW_TRAIN enum) is not a kind of training logic, IMO it is better to remove it from the main.
Suggestion
In such background, I suggest this direction: #12445
AS-IS
onert_train/args
: hold an integer valueonert_train/onert_train
: parse integer value toNNFW_TRAIN_*
enum and always overwrite session's training info.TO-BE
onert_train/args
: directly hold an enumNNFW_TRAIN_*
and to represent nothing is given usestd::optional
.onert_train/args
: check cmd line parameter is given or not, and then decide whether to overwrite the session's training info or not.Side effects of my suggestion
To merge the draft, it expects some additional changes :
std::optional
is introduced in C++17, C++17 needs to be used to compileonert_train
.Boost v1.58.0
used in android-build does not support C++17, boost version has to be upgraded.The text was updated successfully, but these errors were encountered: