mirror of
https://github.com/wassname/PointCNN.git
synced 2026-09-09 11:15:29 +08:00
Fix MNIST to work again.
This commit is contained in:
+7
-1
@@ -10,7 +10,13 @@ def EndChannels(f, make_contiguous = False):
|
||||
|
||||
def __init__(self):
|
||||
super(WrappedLayer, self).__init__()
|
||||
self.forward = lambda x: f(x.permute(0,3,1,2)).permute(0,2,3,1)
|
||||
self.f = f
|
||||
|
||||
def forward(self, x):
|
||||
x = x.permute(0,3,1,2)
|
||||
x = self.f(x)
|
||||
x = x.permute(0,2,3,1)
|
||||
return x
|
||||
|
||||
return WrappedLayer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user