MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / forward

Method forward

preprocess/SpaTrackV2_code/models/blocks.py:142–151  ·  view source on GitHub ↗
(self, x, **kwargs)

Source from the content-addressed store, hash-verified

140 self.amp_dtype = amp_dtype
141
142 def forward(self, x, **kwargs):
143 with torch.autocast("cuda", enabled=self.amp, dtype = self.amp_dtype):
144 feats = {}
145 scale = 1
146 for layer in self.layers:
147 if isinstance(layer, nn.MaxPool2d):
148 feats[scale] = x
149 scale = scale*2
150 x = layer(x)
151 return feats
152
153class CNNandDinov2(nn.Module):
154 def __init__(self, cnn_kwargs = None, amp = True, amp_dtype = torch.float16):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected