From b0cd4015c2b8bee8ee1069c870f1c4cde41364b3 Mon Sep 17 00:00:00 2001 From: Guillaume Fradet <14927435+guillaumefrd@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:46:40 +0200 Subject: [PATCH] extra_repr for DropBlock layer (#6140) * Add extra_repr for DropBlock layer * simplify with fstring --- mmdet/models/plugins/dropblock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mmdet/models/plugins/dropblock.py b/mmdet/models/plugins/dropblock.py index 7283acf39f3..bb00ade7384 100644 --- a/mmdet/models/plugins/dropblock.py +++ b/mmdet/models/plugins/dropblock.py @@ -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}')