Commit ef3bceff authored by Yuxin Wu's avatar Yuxin Wu

fix fasterrcnn performance issue

parent 22c9c4d0
......@@ -623,5 +623,5 @@ if __name__ == '__main__':
max_epoch=config.LR_SCHEDULE[-1] * factor // stepnum,
session_init=get_model_loader(args.load) if args.load else None,
)
trainer = SyncMultiGPUTrainerReplicated(get_nr_gpu(), mode='cpu')
trainer = SyncMultiGPUTrainerReplicated(get_nr_gpu(), mode='nccl')
launch_train_with_config(cfg, trainer)
......@@ -491,6 +491,8 @@ class JoinData(DataFlow):
df_lists (list): a list of DataFlow.
When these dataflows have different sizes, JoinData will stop when any
of them is exhausted.
The list could contain the same DataFlow instance more than once,
but note that `get_data` will then also be called many times.
"""
self.df_lists = df_lists
......@@ -503,7 +505,7 @@ class JoinData(DataFlow):
logger.info("[JoinData] Size check failed for the list of dataflow to be joined!")
def reset_state(self):
for d in self.df_lists:
for d in set(self.df_lists):
d.reset_state()
def size(self):
......@@ -522,9 +524,6 @@ class JoinData(DataFlow):
yield dp
except StopIteration: # some of them are exhausted
pass
finally:
for itr in itrs:
del itr
def SelectComponent(ds, idxs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment