Caffe2 - Python API
A deep learning, cross platform ML framework
Packages
Classes
Files
C++ API
Python API
GitHub
File List
torch
nn
_functions
vision.py
1
import
torch
2
import
torch.backends.cudnn
as
cudnn
3
from
..._jit_internal
import
weak_script
4
5
6
@weak_script
7
def
affine_grid_generator(theta, size):
8
# type: (Tensor, List[int]) -> Tensor
9
if
theta.is_cuda
and
cudnn.enabled
and
cudnn.is_acceptable(theta)
and
len(size) == 4
and
size[0] < 65536:
10
N, C, H, W = size
11
ret = torch.cudnn_affine_grid_generator(theta, N, C, H, W)
12
else
:
13
ret = torch.affine_grid_generator(theta, size)
14
return
ret
torch.backends.cudnn
Definition:
__init__.py:1
Generated on Thu Mar 21 2019 13:06:37 for Caffe2 - Python API by
1.8.11