Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

381 B
Raw Blame

kornia.enhance.solarize applies a one-element thresholds or additions tensor, such as torch.tensor([0.5]), to the whole batch, as its docstring says and as a 0-d tensor does. It used to read a (1,) tensor as one value per sample and raise AssertionError unless the batch, or for an unbatched (C, H, W) image the channel count, was 1; a (1, 1) tensor always raised.