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

Method __init__

examples/trans/model.py:552–569  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

550 # TODO: replace current with
551 # def __init__(self, out_features, bias=True):
552 def __init__(self, out_features, *args, bias=False, **kwargs):
553 """
554 Args:
555 ut_channels: int, the channel of output, also is the number of
556 filters
557 bias: bool
558 """
559 super(Linear3D, self).__init__()
560 self.out_features = out_features
561
562 # TODO: for backward compatibility, to remove
563 if len(args) > 0:
564 self.in_features = out_features
565 self.out_features = args[0]
566 if len(args) > 1:
567 self.bias = args[1]
568 else:
569 self.bias = bias
570
571 def initialize(self, x):
572 self.in_features = x.shape[-1]

Callers 9

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected