diff options
author | Adam Paszke <adam.paszke@gmail.com> | 2016-11-15 21:21:37 +0100 |
---|---|---|
committer | Adam Paszke <adam.paszke@gmail.com> | 2016-11-15 23:02:14 +0100 |
commit | ae6f2dd11cddf527a658961d682e81d28e622a89 (patch) | |
tree | 289a48129d6dae309f19c36f3a599933844aa4da /torch/_thnn | |
parent | 456998f043c1281a1d202ab26dd7507bbd2a4902 (diff) | |
download | pytorch-ae6f2dd11cddf527a658961d682e81d28e622a89.tar.gz pytorch-ae6f2dd11cddf527a658961d682e81d28e622a89.tar.bz2 pytorch-ae6f2dd11cddf527a658961d682e81d28e622a89.zip |
Adapt nn code to changes in THNN and THCUNN
Diffstat (limited to 'torch/_thnn')
-rw-r--r-- | torch/_thnn/__init__.py | 2 | ||||
-rw-r--r-- | torch/_thnn/utils.py | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/torch/_thnn/__init__.py b/torch/_thnn/__init__.py index a3bc6f4c4d..97474692eb 100644 --- a/torch/_thnn/__init__.py +++ b/torch/_thnn/__init__.py @@ -46,8 +46,6 @@ type2backend = Backends() _thnn_headers = parse_header(THNN_H_PATH) _thcunn_headers = parse_header(THCUNN_H_PATH) -for function in _thcunn_headers: - function.name = function.name[4:] for t in ['Float', 'Double']: backend = Backend(t, 'torch._thnn._THNN', _thnn_headers) diff --git a/torch/_thnn/utils.py b/torch/_thnn/utils.py index c1daebe7ed..c62fc2a29e 100644 --- a/torch/_thnn/utils.py +++ b/torch/_thnn/utils.py @@ -90,7 +90,7 @@ def parse_header(path): fn_name = fn_name[:-1] generic_functions.append(Function(fn_name)) elif l: - t, name = l.split(' ') + t, name = l.split() if '*' in name: t = t + '*' name = name[1:] |