File size: 173 Bytes
6ded986 |
1 2 3 4 5 6 7 8 |
import torch
class Normalizer(torch.nn.Module):
def forward(self, pixels: torch.Tensor) -> torch.Tensor:
pixels = pixels.float()
return pixels / 255.0
|
6ded986 |
1 2 3 4 5 6 7 8 |
import torch
class Normalizer(torch.nn.Module):
def forward(self, pixels: torch.Tensor) -> torch.Tensor:
pixels = pixels.float()
return pixels / 255.0
|