So I have been trying to rebuild the MNIST example from the Pytorch C++ Frontend tutorial.
However, I get a c10::Error at the following line:
torch::Tensor d_loss_real = torch::binary_cross_entropy(real_output, real_labels);

real_output and real_labels are simply tensor, and neither of them is null.
This is how the error code reads:

Unhandled exception at 0x00007FF873E03B29 in MNIST_Example.exe: Microsoft C++ exception: c10::Error at memory location 0x0000000E2C35CED0.

Weirdly enough, I cannot even step into the function using the debugger (Yes I enabled it, it works on other functions). Wrapping the whole thing in a try catch and printing exception.what() simply gets me

Unknown Exception

Some more infos:

Windows 10 using Visual Studio
Llibtorch debug version without GPU Support (also I do not have a GPU if that is relevant)
.dll files are in the same folder as .exe
build system is CMake

Any tipps would be greatly appreciated.