Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

716 B
Raw Blame

mean_absolute_disparity_error, root_mean_squared_disparity_error, mean_bad_pixel_error and kitti_d1_error move a valid_mask that is on another device than the disparity maps to the maps' device. In 0.9.0, a CPU mask with CUDA or MPS maps raised torch's RuntimeError under every reduction; it works again and gives the same result as a mask on the maps' device. Maps on two different devices now raise kornia's DeviceError instead of torch's RuntimeError. DeviceError is a ValueError, not a RuntimeError, so an except RuntimeError around such a call no longer catches it. A 0-d map on the CPU still combines with a 0-d map on another device, because torch treats a 0-d CPU tensor as a scalar.