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

calamari/1.0: Remove noisy/useless print around model.summary() call #350

Merged

Conversation

mikegerber
Copy link
Contributor

In the TensorflowModel constructor, model.summary() is called to output a summary of the model created/loaded. TF's summary() prints itself, but returns None, so the print() around it always prints "None".

OCR-D just configured the amount of noi... console output wanted from TensorFlow, so while I don't get any output from summary() anymore, I do see this spurious "None", which we didn't notice before within the other messages by TF.

Only applies to Calamari 1.0, I think - but I didn't check 2.x very thoroughly.

API docs:
https://www.tensorflow.org/api_docs/python/tf/keras/Model#summary

In the TensorflowModel constructor, model.summary() is called to output
a summary of the model created/loaded. TF's summary() prints itself, but
returns None, so the print() around it always prints "None".

OCR-D just configured the amount of noi... console output wanted
from TensorFlow, so while I don't get any output from summary() anymore,
I do see this spurious "None", which we didn't notice before within the
other messages by TF.

Only applies to Calamari 1.0, I think - but I didn't check 2.x very
thoroughly.

API docs:
https://www.tensorflow.org/api_docs/python/tf/keras/Model#summary
@mikegerber
Copy link
Contributor Author

OCR-D just configured the amount of noi... console output wanted from TensorFlow, so while I don't get any output from summary() anymore,

Clarification: OCR-D set TensorFlow log level and I believe this causes model.summary() to be silent. That's not a problem in Calamari, this just lead me to notice the noisy print(None) (effectively).

@mikegerber mikegerber changed the title Remove noisy/useless print around model.summary() call calamari/1.0: Remove noisy/useless print around model.summary() call Oct 26, 2023
@bertsky bertsky merged commit 5dfe727 into Calamari-OCR:calamari/1.0 Jul 31, 2024
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

Successfully merging this pull request may close these issues.

2 participants