diff --git a/kraken/lib/models.py b/kraken/lib/models.py index fbc1c32bb..4ec8daa62 100644 --- a/kraken/lib/models.py +++ b/kraken/lib/models.py @@ -109,7 +109,7 @@ def forward(self, line: torch.Tensor, lens: torch.Tensor = None) -> Union[np.nda o, olens = self.nn.nn(line, lens) if o.size(2) != 1: raise KrakenInputException('Expected dimension 3 to be 1, actual {}'.format(o.size())) - self.outputs = o.detach().squeeze(2).cpu().numpy() + self.outputs = o.detach().squeeze(2).float().cpu().numpy() if olens is not None: olens = olens.cpu().numpy() return self.outputs, olens