mirror of
https://github.com/qurator-spk/sbb_binarization.git
synced 2025-06-08 19:59:57 +02:00
comment out explicit GC calls / session management
This commit is contained in:
parent
4086c6956a
commit
6dc83dd1a5
1 changed files with 2 additions and 2 deletions
|
@ -87,8 +87,8 @@ class SbbBinarizer:
|
||||||
predicted_patches = model.predict(image_patches, verbose=0)
|
predicted_patches = model.predict(image_patches, verbose=0)
|
||||||
# We have to manually call garbage collection and clear_session here to avoid memory leaks.
|
# We have to manually call garbage collection and clear_session here to avoid memory leaks.
|
||||||
# Taken from https://medium.com/dive-into-ml-ai/dealing-with-memory-leak-issue-in-keras-model-training-e703907a6501
|
# Taken from https://medium.com/dive-into-ml-ai/dealing-with-memory-leak-issue-in-keras-model-training-e703907a6501
|
||||||
gc.collect()
|
#gc.collect()
|
||||||
tf.keras.backend.clear_session()
|
#tf.keras.backend.clear_session()
|
||||||
|
|
||||||
# The result is a white-on-black image that needs to be inverted to be displayed as black-on-white image
|
# The result is a white-on-black image that needs to be inverted to be displayed as black-on-white image
|
||||||
# We do this by converting the binary values to a boolean numpy-array and then inverting the values
|
# We do this by converting the binary values to a boolean numpy-array and then inverting the values
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue