-
Notifications
You must be signed in to change notification settings - Fork 45.4k
Closed
Labels
stat:awaiting responseWaiting on input from the contributorWaiting on input from the contributor
Description
In the function add_cdf_image_summary
within object_detection/utils/visualization_utils.py
:
The CDF plots created using matplotlib
(for instance, when training an object detector with focal loss) are not properly closed. Consequently, they aren't garbage collected and result in the following warning during training:
/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py:524: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (
matplotlib.pyplot.figure
) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParamfigure.max_open_warning
)
Inserting plt.close(fig)
before returning the image resolves the issue.
YijinLiu, bucktoothsir and bnascimento
Metadata
Metadata
Assignees
Labels
stat:awaiting responseWaiting on input from the contributorWaiting on input from the contributor