Skip to content

Commit

Permalink
Merge pull request #88 from MendelXu/main
Browse files Browse the repository at this point in the history
add assert terms
  • Loading branch information
MendelXu authored Nov 2, 2021
2 parents 2f5b0df + dd091dc commit 944b131
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ssod/datasets/samplers/semi_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def __init__(
rank=None,
**kwargs
):
# check to avoid some problem
assert samples_per_gpu > 1, "samples_per_gpu should be greater than 1."
_rank, _num_replicas = get_dist_info()
if num_replicas is None:
num_replicas = _num_replicas
Expand Down Expand Up @@ -190,6 +192,7 @@ def __len__(self):

def set_epoch(self, epoch):
self.epoch = epoch

# duplicated, implement it by weight instead of sampling
# def update_sample_ratio(self):
# if self.dynamic_step is not None:
Expand Down

0 comments on commit 944b131

Please sign in to comment.