Upsample module crashes on forward call

I was trying to use torch::nn::Upsample module in torchlib 1.12 (1.12.0+cu116). It crashes on the forward call.

The minimal reproducable example. I tested this on the cpu.

	torch::Tensor tensor = torch::zeros({ 1, 3, 512, 512 }); 
	std::vector<double> scl = {2.0};
	torch::nn::Upsample upsample_module(torch::nn::UpsampleOptions().scale_factor(scl).mode(torch::kNearest).align_corners(false));
	torch::Tensor output = upsample_module(tensor);

I am not sure if I am using it right way, however, the documentations says only


Upsample model(UpsampleOptions().scale_factor({3}).mode(torch::kLinear).align_corners(false));

Tested on:
Windows 10
torchlib 1.12
Cuda 11.6
RTX 3090