MCPcopy Create free account
hub / github.com/pytorch/pytorch / __call__

Method __call__

caffe2/python/net_printer.py:33–43  ·  view source on GitHub ↗
(self, obj, *args, **kwargs)

Source from the content-addressed store, hash-verified

31 return _register
32
33 def __call__(self, obj, *args, **kwargs):
34 if obj is None:
35 return
36
37 Type = type(obj)
38 if Type not in self.__class__.visitors:
39 raise TypeError('%s: unsupported object type: %s' % (
40 self.__class__.__name__, Type))
41
42 func = self.__class__.visitors[Type]
43 return func(self, obj, *args, **kwargs)
44
45
46class Analyzer(Visitor):

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected