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

Method forward

sam2_train/modeling/sam2_utils.py:127–132  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

125 self.act = activation()
126
127 def forward(self, x):
128 for i, layer in enumerate(self.layers):
129 x = self.act(layer(x)) if i < self.num_layers - 1 else layer(x)
130 if self.sigmoid_output:
131 x = F.sigmoid(x)
132 return x
133
134
135# From https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/batch_norm.py # noqa

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected