Commit 0dbc4779 authored by patil-suraj's avatar patil-suraj
Browse files

add centered back

parent 5018abff
...@@ -229,6 +229,7 @@ class NCSNpp(ModelMixin, ConfigMixin): ...@@ -229,6 +229,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self, self,
image_size=1024, image_size=1024,
num_channels=3, num_channels=3,
centered=False,
attn_resolutions=(16,), attn_resolutions=(16,),
ch_mult=(1, 2, 4, 8, 16, 32, 32, 32), ch_mult=(1, 2, 4, 8, 16, 32, 32, 32),
conditional=True, conditional=True,
...@@ -253,6 +254,7 @@ class NCSNpp(ModelMixin, ConfigMixin): ...@@ -253,6 +254,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self.register_to_config( self.register_to_config(
image_size=image_size, image_size=image_size,
num_channels=num_channels, num_channels=num_channels,
centered=centered,
attn_resolutions=attn_resolutions, attn_resolutions=attn_resolutions,
ch_mult=ch_mult, ch_mult=ch_mult,
conditional=conditional, conditional=conditional,
...@@ -457,7 +459,8 @@ class NCSNpp(ModelMixin, ConfigMixin): ...@@ -457,7 +459,8 @@ class NCSNpp(ModelMixin, ConfigMixin):
temb = None temb = None
# If input data is in [0, 1] # If input data is in [0, 1]
x = 2 * x - 1.0 if not self.config.centered:
x = 2 * x - 1.0
# Downsampling block # Downsampling block
input_pyramid = None input_pyramid = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment