Skip to content

Commit 07d0c4a

Browse files
committed
Improve repr for DropPath module
1 parent e27c16b commit 07d0c4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

timm/models/layers/drop.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,6 @@ def __init__(self, drop_prob: float = 0., scale_by_keep: bool = True):
164164

165165
def forward(self, x):
166166
return drop_path(x, self.drop_prob, self.training, self.scale_by_keep)
167+
168+
def extra_repr(self):
169+
return f'drop_prob={round(self.drop_prob,3):0.3f}'

0 commit comments

Comments
 (0)