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

Wrong config option in sample code #24

Closed
danielschaeufele opened this issue Jan 20, 2022 · 3 comments
Closed

Wrong config option in sample code #24

danielschaeufele opened this issue Jan 20, 2022 · 3 comments

Comments

@danielschaeufele
Copy link

In line 150 of samples/mlp_learning_an_image.cu the following code is used to set the number of layers:

{"n_layers", 4},

However, this is ignored and the default is used instead, as the correct name for this option is n_hidden_layers. Also this doesn't give any warnings as unknown options are just ignored.

PS: A proper documentation for the config would be very nice, as currently it is necessary to look for the available options in the code. Also the possibility to print the used configuration would be helpful for debugging and avoiding errors like these.

@Tom94
Copy link
Collaborator

Tom94 commented Jan 20, 2022

Good catch, thanks! Will fix that one up.

There is a documentation, actually. It's linked in the README: https://github.com/NVlabs/tiny-cuda-nn/blob/master/DOCUMENTATION.md

As for serializing / printing out the current configuration. Agreed! To a certain degree, this is already supported. The Optimizer objects have

virtual json serialize() const;

which currently conflates writing out the config and serializing the current state of the optimizer.
As time permits, I'd be totally open for a more generic to_json interface (as per the nlohmann specs).

@danielschaeufele
Copy link
Author

Thanks for the link, I should have read the readme more carefully 😓

@Tom94
Copy link
Collaborator

Tom94 commented Jan 20, 2022

Addressed with 8e1f4a2 :)

(Gonna keep track of the to_json todo separately. We should totally add it eventually.)

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