Args: ut_channels: int, the channel of output, also is the number of filters bias: bool
(self, out_features, *args, bias=False, **kwargs)
| 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] |