MCPcopy Create free account
hub / github.com/dcharatan/flowmap / FrameSamplerOverfit

Class FrameSamplerOverfit

flowmap/frame_sampler/frame_sampler_overfit.py:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class FrameSamplerOverfit(FrameSampler[FrameSamplerOverfitCfg]):
20 def sample(
21 self,
22 num_frames_in_video: int,
23 device: torch.device,
24 ) -> Int64[Tensor, " frame"]:
25 start = self.cfg.start or 0
26 num_frames = self.cfg.num_frames or num_frames_in_video
27 step = self.cfg.step or 1
28 return torch.arange(
29 start,
30 start + num_frames * step,
31 step,
32 device=device,
33 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected