MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / __call__

Method __call__

optimizers/kfac_utils.py:43–50  ·  view source on GitHub ↗
(cls, input, grad_output, layer)

Source from the content-addressed store, hash-verified

41
42 @classmethod
43 def __call__(cls, input, grad_output, layer):
44 if isinstance(layer, nn.Linear):
45 grad = cls.linear(input, grad_output, layer)
46 elif isinstance(layer, nn.Conv2d):
47 grad = cls.conv2d(input, grad_output, layer)
48 else:
49 raise NotImplementedError
50 return grad
51
52 @staticmethod
53 def linear(input, grad_output, layer):

Callers

nothing calls this directly

Calls 2

linearMethod · 0.45
conv2dMethod · 0.45

Tested by

no test coverage detected