ACCC1380's picture
download
raw
307 Bytes
import torch
from torch import nn
class PixelNorm(nn.Module):
def __init__(self, dim=1, eps=1e-8):
super(PixelNorm, self).__init__()
self.dim = dim
self.eps = eps
def forward(self, x):
return x / torch.sqrt(torch.mean(x**2, dim=self.dim, keepdim=True) + self.eps)

Xet Storage Details

Size:
307 Bytes
·
Xet hash:
9adbb94a8246cecfab612b837733817692f1acbd7a660fcaa8e335dd491b8887

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.