Thanks a lot.
I did try the range outside of the product and it failed with the same error nevertheless.
I also substituted the product with the PyTorch’s built-in cartesian-prod if I remember correctly but that seems not to work either.