MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

python/singa/layer.py:294–312  ·  view source on GitHub ↗

Args: out_channels: int, the channel of output, also is the number of filters bias: bool

(self, out_features, *args, bias=True, **kwargs)

Source from the content-addressed store, hash-verified

292 # TODO: replace current with
293 # def __init__(self, out_features, bias=True):
294 def __init__(self, out_features, *args, bias=True, **kwargs):
295 """
296 Args:
297 out_channels: int, the channel of output, also is the number of
298 filters
299 bias: bool
300 """
301 super(Linear, self).__init__()
302
303 self.out_features = out_features
304
305 # TODO: for backward compatibility, to remove
306 if len(args) > 0:
307 self.in_features = out_features
308 self.out_features = args[0]
309 if len(args) > 1:
310 self.bias = args[1]
311 else:
312 self.bias = bias
313
314 def initialize(self, x):
315 self.in_features = x.shape[1]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected