Thanks for your answer.
After investigating the model (commenting blocks of code until the error is gone), I have traced back to the error to creating a tensor manually from a blend of 0-dim tensor and floats.
E.g. torch.tensor([[my_tensor, my_tensor]]) works 
E.g. torch.tensor([[my_tensor, 0.0]]) raises the error 
I have solved it in my case by using:
torch.cat([my_tensor.view(1), torch.tensor([0.0])]).unsqueeze
or something similar.
Julien