Skip to content
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

Model Configuration Guide Updates and Loss Layers Usage Examples Request #2826

Open
kim-com opened this issue Dec 11, 2024 · 2 comments
Open
Assignees

Comments

@kim-com
Copy link

kim-com commented Dec 11, 2024

  1. Update request for model configuration guide
    When looking at the items in the ini file generated after saving the model, there are many things that are not mentioned in the official documentation.
    For example, among the following contents, only type, epochs, loss, save_path, and batch_size have descriptions, but the rest do not.
[model]
batch_size = 32
continue_train = false
epochs = 200
loss = mse
loss_scale = 1.000000
memory_optimization = true
memory_swap = false
memory_swap_lookahead = 0
memory_swap_path = .
model_tensor_type = FP32-FP32
tensor_format = NCHW
type = NeuralNetwork
  1. Guide and examples for using loss layers
    When loading a model, I received a log message like this:
[NNTRAINER WARN  2024-12-11 14:29:44] (/home/-----/nntrainer/nntrainer/models/model_common_properties.cpp:isValid:22) Model loss property is deprecated, use loss layer directly instead

It would be helpful to have some examples on how to use loss layers.

  1. When saving a model as an ini file, the loss_scale value was 0, and the following error occurred when loading it:

code:

try {
    model->load(config, ml::train::ModelFormat::MODEL_FORMAT_INI);
  } catch (std::exception &e) {
    std::cerr << "Error while loading model! details: " << e.what()
              << std::endl;
    return 1;
  }

bash:

Error while loading model! details: invalid argument from c style throw

log:

[NNTRAINER ERROR 2024-12-11 15:50:30] (/home/kimhyeongjun/tizen/github/workspace2/nntrainer/nntrainer/models/model_common_properties.cpp:isValid:48) Loss scale cannot be 0
[NNTRAINER ERROR 2024-12-11 15:50:30] (/home/kimhyeongjun/tizen/github/workspace2/nntrainer/nntrainer/models/model_loader.cpp:loadModelConfigIni:131) St16invalid_argument argument is not valid
@EunjuYang
Copy link
Contributor

EunjuYang commented Dec 11, 2024

Hello, @kim-com
Thank you for your concern about NNTrainer project 😊
NNTrainer has been actively updated, and the very recent features (e.g., memory swap and loss scaling) are not yet updated in the documentation. We will update them soon.
About the issues, we're going to investigate it. Thank you.

@EunjuYang
Copy link
Contributor

Here're some updates on loss_scale issue from our side:

Please let us know if you have further issues.
About updating documentation, you suggested, we will update it ASAP. Thank you for actively using NNTrainer ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants