If this helps, I provide the call stack as shown by Visual studio:
 	KernelBase.dll!00007ffc0d563b29()	Unknown
 	vcruntime140d.dll!00007ffc018bb1f0()	Unknown
 	torch_cpu.dll!00007ffb9561c8fb()	Unknown
 	torch_cpu.dll!00007ffb955f1886()	Unknown
 	torch_cpu.dll!00007ffb955df815()	Unknown
 	torch_cpu.dll!00007ffb955de778()	Unknown
 	torch_cpu.dll!00007ffb95e8bb75()	Unknown
 	torch_cpu.dll!00007ffb95304f42()	Unknown
 	torch_cpu.dll!00007ffb95305067()	Unknown
 	torch_cpu.dll!00007ffb91bec6f2()	Unknown
 	torch_cpu.dll!00007ffb91beea6c()	Unknown
 	torch_cpu.dll!00007ffb91bec5c6()	Unknown
 	torch_cpu.dll!00007ffb91bf4b01()	Unknown
 	torch_cpu.dll!00007ffb91bae475()	Unknown
>	MNIST_Example.exe!main() Line 165	C++
 	MNIST_Example.exe!invoke_main() Line 79	C++
 	MNIST_Example.exe!__scrt_common_main_seh() Line 288	C++
 	MNIST_Example.exe!__scrt_common_main() Line 331	C++
 	MNIST_Example.exe!mainCRTStartup() Line 17	C++
 	kernel32.dll!00007ffc0fa07bd4()	Unknown
 	ntdll.dll!00007ffc1042ce51()	Unknown


The line 165 is the one where binary_cross_entropy is called.