488945b0a03843dc46953f801c6824d716d8fe9c,kornia/contrib/extract_patches.py,,extract_tensor_patches,#Any#Any#Any#Any#,127
Before Change
See :class:`~kornia.contrib.ExtractTensorPatches` for details.
return ExtractTensorPatches(window_size, stride, padding)(input)
After Change
See :class:`~kornia.contrib.ExtractTensorPatches` for details.
if not torch.is_tensor(input):
raise TypeError("Input input type is not a torch.Tensor. Got {}"
.format(type(input)))
if not len(input.shape) == 4:
raise ValueError("Invalid input shape, we expect BxCxHxW. Got: {}"
.format(input.shape))
if padding:
pad_vert, pad_horz = _pair(padding)
input = F.pad(input, [pad_horz, pad_horz, pad_vert, pad_vert])
return _extract_tensor_patchesnd(input, _pair(window_size), _pair(stride))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: arraiy/torchgeometry
Commit Name: 488945b0a03843dc46953f801c6824d716d8fe9c
Time: 2020-08-28
Author: github.pmeier@posteo.de
File Name: kornia/contrib/extract_patches.py
Class Name:
Method Name: extract_tensor_patches
Project Name: cornellius-gp/gpytorch
Commit Name: d030d7b419972323583c3b7378e4de9183ba9192
Time: 2018-10-01
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/constant_mul_lazy_tensor.py
Class Name: ConstantMulLazyTensor
Method Name: __getitem__
Project Name: dmlc/dgl
Commit Name: cf8a3fb30547d6e980ecd8182f64a51df8e55c62
Time: 2021-02-10
Author: expye@outlook.com
File Name: python/dgl/backend/pytorch/tensor.py
Class Name:
Method Name: pack_padded_tensor
Project Name: pytorch/fairseq
Commit Name: 5028ed1b6bedd526dee27ea731284f43e87303f0
Time: 2020-03-11
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: train_step