MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / Transpose

Class Transpose

ldm/modules/midas/midas/vit.py:45–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45class Transpose(nn.Module):
46 def __init__(self, dim0, dim1):
47 super(Transpose, self).__init__()
48 self.dim0 = dim0
49 self.dim1 = dim1
50
51 def forward(self, x):
52 x = x.transpose(self.dim0, self.dim1)
53 return x
54
55
56def forward_vit(pretrained, x):

Callers 2

_make_vit_b16_backboneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected