Skip to content

Commit

Permalink
extra_repr for DropBlock layer (open-mmlab#6140)
Browse files Browse the repository at this point in the history
* Add extra_repr for DropBlock layer

* simplify with fstring
  • Loading branch information
guillaumefrd authored Sep 27, 2021
1 parent 3c65819 commit b0cd401
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mmdet/models/plugins/dropblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ def _compute_gamma(self, feat_size):
factor = (1.0 if self.iter_cnt > self.warmup_iters else self.iter_cnt /
self.warmup_iters)
return gamma * factor

def extra_repr(self):
return (f'drop_prob={self.drop_prob}, block_size={self.block_size}, '
f'warmup_iters={self.warmup_iters}')

0 comments on commit b0cd401

Please sign in to comment.