MCPcopy Create free account
hub / github.com/ImprintLab/Medical-SAM2 / __init__

Method __init__

sam2_train/modeling/sam2_utils.py:90–93  ·  view source on GitHub ↗
(self, drop_prob=0.0, scale_by_keep=True)

Source from the content-addressed store, hash-verified

88class DropPath(nn.Module):
89 # adapted from https://github.com/huggingface/pytorch-image-models/blob/main/timm/layers/drop.py
90 def __init__(self, drop_prob=0.0, scale_by_keep=True):
91 super(DropPath, self).__init__()
92 self.drop_prob = drop_prob
93 self.scale_by_keep = scale_by_keep
94
95 def forward(self, x):
96 if self.drop_prob == 0.0 or not self.training:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected