Handling singular matrices

Hey guys!

I am currently running into the following problem:
I’ll get the
RuntimeError: inverse_cuda: For batch 0: U(1,1) is zero, singular U.
message, when computing lots of determinants during the forward pass. Do you know how to tackle this problem appropriately? I am aware of the fact that the matrices have to be non-singular in order to compute its gradients - but how to make sure that only non-singular matrices are considered when backwarding?
(Btw. https://github.com/NVIDIA/waveglow/issues/63 proposed to update cuDNN and CUDA. It didn’t work for me though.)

Thanks a lot in advance!