45aac954cfe5ff814fe34492462d3c736fb8c36f,kornia/augmentation/functional.py,,apply_rotation,#Any#Any#Any#,488
Before Change
if not torch.is_tensor(input):
raise TypeError(f"Input type is not a torch.Tensor. Got {type(input)}")
if not torch.is_tensor(degrees):
if isinstance(degrees, float):
if degrees < 0:
raise ValueError(f"If Degrees is only one number it must be a positive number. Got{degrees}")
degrees = torch.tensor([-degrees, degrees])
elif isinstance(degrees, (tuple, list)):
degrees = torch.tensor(degrees)
else:
raise TypeError(f"Degrees should be a float number a sequence or a tensor. Got {type(degrees)}")
degrees = cast(torch.Tensor, degrees)
if degrees.numel() != 2:
raise ValueError("If degrees is a sequence it must be of length 2")
After Change
input = input.unsqueeze(0)
input = input.view((-1, (*input.shape[-3:])))
angles: torch.Tensor = params["degrees"].to(device, dtype)
transformed: torch.Tensor = rotate(input, angles).squeeze(0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: arraiy/torchgeometry
Commit Name: 45aac954cfe5ff814fe34492462d3c736fb8c36f
Time: 2020-01-23
Author: diegovd0296@gmail.com
File Name: kornia/augmentation/functional.py
Class Name:
Method Name: apply_rotation
Project Name: inferno-pytorch/inferno
Commit Name: b8904ac33f1f480f451762cdede8d66f6195763a
Time: 2019-05-26
Author: valentyna.zinchenko@embl.de
File Name: inferno/trainers/basic.py
Class Name: Trainer
Method Name: wrap_batch
Project Name: arraiy/torchgeometry
Commit Name: ab9c4f8474ca744c7e67822fa21d408d0b0ae2d0
Time: 2020-04-18
Author: sj8716643@126.com
File Name: kornia/augmentation/functional.py
Class Name:
Method Name: apply_rotation