e06eee5deec11dc03d6c4975eb9a57f2bc6edd30,kornia/utils/image.py,,tensor_to_image,#Any#,32
Before Change
if len(input_shape) == 2:
tensor = torch.squeeze(tensor, dim=-1)
return tensor.cpu().detach().numpy()
After Change
image: np.array = hw_tensor_to_hw_image(tensor)
elif len(input_shape) == 3:
image: np.array = chw_tensor_to_hwc_image(tensor)
elif len(input_shape) == 4:
image: np.array = bchw_tensor_to_bhwc_image(tensor)
else:
raise ValueError("Cannot process tensor with shape {}".format(input_shape))
return image
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: arraiy/torchgeometry
Commit Name: e06eee5deec11dc03d6c4975eb9a57f2bc6edd30
Time: 2019-05-28
Author: jiangwei1993@gmail.com
File Name: kornia/utils/image.py
Class Name:
Method Name: tensor_to_image
Project Name: tensorflow/models
Commit Name: bc324fda2866eab986a604b19272137f9006a603
Time: 2021-02-10
Author: arashwan@google.com
File Name: official/vision/beta/tasks/semantic_segmentation.py
Class Name: SemanticSegmentationTask
Method Name: reduce_aggregated_logs
Project Name: open-mmlab/mmdetection
Commit Name: e421e832883241bd7831bf77dc31d5fb31d7da58
Time: 2019-04-06
Author: chenkaidev@gmail.com
File Name: mmdet/ops/nms/nms_wrapper.py
Class Name:
Method Name: nms