Spaces:
Running
on
Zero
Running
on
Zero
fix vae nan bug
Browse files
vqvae.py
CHANGED
@@ -58,6 +58,7 @@ class Autoencoder(nn.Module):
|
|
58 |
# Get embeddings with shape `[batch_size, z_channels * 2, z_height, z_height]`
|
59 |
print(f"encoder parameters max: {max([p.max() for p in self.encoder.parameters()])}")
|
60 |
print(f"encoder parameters min: {min([p.min() for p in self.encoder.parameters()])}")
|
|
|
61 |
z = self.encoder(img)
|
62 |
print(f"z.max(): {z.max()}, z.min(): {z.min()}")
|
63 |
# Get the moments in the quantized embedding space
|
|
|
58 |
# Get embeddings with shape `[batch_size, z_channels * 2, z_height, z_height]`
|
59 |
print(f"encoder parameters max: {max([p.max() for p in self.encoder.parameters()])}")
|
60 |
print(f"encoder parameters min: {min([p.min() for p in self.encoder.parameters()])}")
|
61 |
+
print(f"img.dtype: {img.dtype}")
|
62 |
z = self.encoder(img)
|
63 |
print(f"z.max(): {z.max()}, z.min(): {z.min()}")
|
64 |
# Get the moments in the quantized embedding space
|