|
|
|
@ -30,7 +30,7 @@ class SRNet(nn.Module):
|
|
|
|
|
return x
|
|
|
|
|
|
|
|
|
|
def get_lut_model(self, quantization_interval=16, batch_size=2**10):
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage1_S, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
lut_model = srlut.SRLut.init_from_lut(stage_lut)
|
|
|
|
|
return lut_model
|
|
|
|
|
|
|
|
|
@ -61,8 +61,8 @@ class SRNetR90(nn.Module):
|
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
def get_lut_model(self, quantization_interval=16, batch_size=2**10):
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
lut_model = srlut.SRLutRot90.init_from_lut(stage_lut)
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage1_S, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
lut_model = srlut.SRLutR90.init_from_lut(stage_lut)
|
|
|
|
|
return lut_model
|
|
|
|
|
|
|
|
|
|
class SRNetR90Y(nn.Module):
|
|
|
|
@ -100,6 +100,6 @@ class SRNetR90Y(nn.Module):
|
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
def get_lut_model(self, quantization_interval=16, batch_size=2**10):
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
lut_model = srlut.SRLutRot90Y.init_from_lut(stage_lut)
|
|
|
|
|
stage_lut = lut.transfer_2x2_input_SxS_output(self.stage1_S, quantization_interval=quantization_interval, batch_size=batch_size)
|
|
|
|
|
lut_model = srlut.SRLutR90Y.init_from_lut(stage_lut)
|
|
|
|
|
return lut_model
|