YYYYYYUUU's picture
Add core reproduction code (binarization layers, PTv3, superpoint ops, min-repro pack)
7b95dc2 verified
Raw
History Blame Contribute Delete
311 Bytes
import torch
import torch.nn as nn
torch.nn.LayerNorm
class LayerNorm1d(nn.BatchNorm1d):
def forward(self, input: torch.Tensor) -> torch.Tensor:
return (
super()
.forward(input.transpose(1, 2).contiguous())
.transpose(1, 2)
.contiguous()
)