MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / _inner_forward

Method _inner_forward

detrsmpl/models/backbones/resnet.py:70–85  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

68 def forward(self, x):
69 """Forward function."""
70 def _inner_forward(x):
71 identity = x
72
73 out = self.conv1(x)
74 out = self.norm1(out)
75 out = self.relu(out)
76
77 out = self.conv2(out)
78 out = self.norm2(out)
79
80 if self.downsample is not None:
81 identity = self.downsample(x)
82
83 out += identity
84
85 return out
86
87 if self.with_cp and x.requires_grad:
88 out = cp.checkpoint(_inner_forward, x)

Callers

nothing calls this directly

Calls 2

norm1Method · 0.95
norm2Method · 0.95

Tested by

no test coverage detected