Spaces:
Running
on
Zero
Running
on
Zero
File size: 312 Bytes
56238f0 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import torch
from src.models.autoencoder.base import BaseAE
class PixelAE(BaseAE):
def __init__(self, scale=1.0, shift=0.0):
super().__init__(scale, shift)
def _impl_encode(self, x):
return x/self.scale+self.shift
def _impl_decode(self, x):
return (x-self.shift)*self.scale |