MCPcopy Create free account
hub / github.com/Anoise/WTFlib / Transpose

Class Transpose

LDPS_Graph/layers/PatchTST_layers.py:7–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import math
6
7class Transpose(nn.Module):
8 def __init__(self, *dims, contiguous=False):
9 super().__init__()
10 self.dims, self.contiguous = dims, contiguous
11 def forward(self, x):
12 if self.contiguous: return x.transpose(*self.dims).contiguous()
13 else: return x.transpose(*self.dims)
14
15
16def get_activation_fn(activation):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected