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

Method linear

optimizers/kfac_utils.py:121–126  ·  view source on GitHub ↗
(a, layer)

Source from the content-addressed store, hash-verified

119
120 @staticmethod
121 def linear(a, layer):
122 # a: batch_size * in_dim
123 batch_size = a.size(0)
124 if layer.bias is not None:
125 a = torch.cat([a, a.new(a.size(0), 1).fill_(1)], 1)
126 return a.t() @ (a / batch_size)
127
128
129class ComputeCovG:

Callers 3

__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected