in src/speech_reps/models/wav2vec2.py [0:0]
def __call__(self, x):
x = torch.from_numpy(x).float()
if self.gpu is not None:
x = x.cuda(self.gpu)
with torch.no_grad():
z = self.model(x.unsqueeze(0))
return z.squeeze(0).cpu().numpy()