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

The parameters printed through model.info are different from those printed through the val command #12786

Open
1 task done
lishihong-1 opened this issue May 18, 2024 · 1 comment
Labels
question Further information is requested

Comments

@lishihong-1
Copy link

Search before asking

Question

Why is the number of layers printed using model.info is different from the summary layers? Why does a yaml file show only twenty layers when there are actually two hundred layers? How should I print the parameters of my own model like a yaml file?
use model.info:
5b0ba27e8dc789bee36b5d31b82e52fa
use val command
9e99649c8dfb84b1944f33305452707f
I hope to print parameters like this even though I have finished training, what should I do?
cc769739cb96d313017854b7c48947eb

Additional

No response

@lishihong-1 lishihong-1 added the question Further information is requested label May 18, 2024
@glenn-jocher
Copy link
Member

Hello! The discrepancy you're seeing between the outputs of model.info and the val command is likely due to different levels of detail each function is designed to provide. The model.info generally provides a detailed summary including all layers and parameters explicitly defined in your model. On the other hand, the val command focuses more on performance metrics and may summarize the model architecture more broadly.

To get a detailed parameter printout similar to what you see in a .yaml file post-training, you can use the model.yaml() method to print or even save your model definition:

print(model.yaml())  # to display on screen
model.yaml(save_path='model_details.yaml')  # to save to a file

This will generate output similar to the initial YAML configuration, reflecting the full list of layers and parameters used in your model. If you’re specifically looking to match the visualization format in the last image, consider custom scripts or tools that format layer and parameter data accordingly. Happy modeling! 🚀

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

No branches or pull requests

2 participants