Method
__init__
(self, attn_layers, conv_layers=None, norm_layer=None)
Source from the content-addressed store, hash-verified
| 142 | Autoformer encoder |
| 143 | """ |
| 144 | def __init__(self, attn_layers, conv_layers=None, norm_layer=None): |
| 145 | super(Encoder, self).__init__() |
| 146 | self.attn_layers = nn.ModuleList(attn_layers) |
| 147 | self.conv_layers = nn.ModuleList(conv_layers) if conv_layers is not None else None |
| 148 | self.norm = norm_layer |
| 149 | |
| 150 | def forward(self, x, attn_mask=None): |
| 151 | attns = [] |
Tested by
no test coverage detected