Found the problem but I’m not sure if it is a bug in PyTorch or my code. After some testing I found out that the sigmoid function returns “wrong” results on large tensors on my Coral Dev Board. If for example I do the following:
a = torch.ones(1000000)
a.sigmoid()

I would receive a result tensor where the first half is ~ 0.7301 and then the second half is ~ 0.43. In my understanding that is not very good as the results differ quite a lot.
My solution was to implement the sigmoid function in numpy but I would prefer to keep it in PyTorch if there is a solution for this.