kornia.testing

This module has been deprecated and will be removed on release 0.8.0 (dec 2024).

The testing package contains testing-specific utilities.

kornia.testing.create_eye_batch(batch_size, eye_size, device=None, dtype=None)

Create a batch of identity matrices of shape Bx3x3.

Return type:

Tensor

kornia.testing.tensor_to_gradcheck_var(tensor, dtype=torch.float64, requires_grad=True)

Convert the input tensor to a valid variable to check the gradient.

gradcheck needs 64-bit floating point and requires gradient.

Return type:

Union[Tensor, str]

kornia.testing.xla_is_available()

Return whether torch_xla is available in the system.

Return type:

bool