MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / forward

Method forward

monai/networks/utils.py:1290–1294  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

1288 self.mod = mod
1289
1290 def forward(self, x):
1291 dtype = x.dtype
1292 with torch.autocast("cuda", enabled=False):
1293 ret = self.mod.forward(x.to(torch.float32)).to(dtype)
1294 return ret
1295
1296
1297class CastToFloatAll(torch.nn.Module):

Callers 1

forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected