Fix corner case bug in coco record.
@@ -113,6 +113,10 @@ class TFDataDataLoader(BaseDataLoader):
outputs = default_collate(outputs)
yield outputs
except OutOfRangeError:
+ if len(outputs) == 0:
+ data_sess.close()
+ return
+ else:
outputs = default_collate(outputs)
yield outputs
data_sess.close()
