MCPcopy Create free account
hub / github.com/deepbrainai-research/float / inference

Method inference

models/float/FLOAT.py:225–229  ·  view source on GitHub ↗
(self, a: torch.Tensor, seq_len:int)

Source from the content-addressed store, hash-verified

223
224 @torch.no_grad()
225 def inference(self, a: torch.Tensor, seq_len:int) -> torch.Tensor:
226 if a.shape[1] % int(seq_len * self.opt.sampling_rate / self.opt.fps) != 0:
227 a = F.pad(a, (0, int(seq_len * self.opt.sampling_rate / self.opt.fps) - a.shape[1]), mode = 'replicate')
228 a = self.get_wav2vec2_feature(a, seq_len=seq_len)
229 return self.audio_projection(a)
230
231
232

Callers

nothing calls this directly

Calls 1

get_wav2vec2_featureMethod · 0.95

Tested by

no test coverage detected