Caffe2 - Python API
A deep learning, cross platform ML framework
Packages
Classes
Files
C++ API
Python API
GitHub
File List
torch
nn
backends
backend.py
1
2
class
FunctionBackend
(object):
3
4
def
__init__(self):
5
self.
function_classes
= {}
6
7
def
__getattr__(self, name):
8
fn = self.function_classes.get(name)
9
if
fn
is
None
:
10
raise
NotImplementedError
11
return
fn
12
13
def
register_function(self, name, function_class):
14
if
self.function_classes.get(name):
15
raise
RuntimeError(
"Trying to register second function under name "
+ name +
" in "
+ type(self).__name__)
16
self.
function_classes
[name] = function_class
torch.nn.backends.backend.FunctionBackend.function_classes
function_classes
Definition:
backend.py:5
torch.nn.backends.backend.FunctionBackend
Definition:
backend.py:2
Generated on Thu Mar 21 2019 13:06:36 for Caffe2 - Python API by
1.8.11