Fix TensorBoard add_image() not being reported

This commit is contained in:
allegroai 2021-09-20 15:52:26 +03:00
parent 9966dd640c
commit bc85fbca0f

View File

@ -367,7 +367,7 @@ class EventTrainsWriter(object):
output = BytesIO(imdata)
im = Image.open(output)
# if this is a GIF store as is
if getattr(im, 'is_animated'):
if getattr(im, 'is_animated', None):
output.close()
fd, temp_file = mkstemp(
suffix=guess_extension(im.get_format_mimetype()) if hasattr(im, 'get_format_mimetype')