Spaces:
Running
on
A100
Running
on
A100
erichardson
commited on
Commit
•
7d89bb0
1
Parent(s):
a91e01c
VAE: Support different latent_var_log options when returning intermediate features for 3D perceptual loss
Browse files
xora/models/autoencoders/video_autoencoder.py
CHANGED
@@ -370,9 +370,7 @@ class Encoder(nn.Module):
|
|
370 |
raise ValueError(f"Invalid input shape: {sample.shape}")
|
371 |
|
372 |
if return_features:
|
373 |
-
features.append(
|
374 |
-
sample[:, sample.shape[1] // 2, ...]
|
375 |
-
) # Add the latent means as final feature
|
376 |
return sample, features
|
377 |
return sample
|
378 |
|
|
|
370 |
raise ValueError(f"Invalid input shape: {sample.shape}")
|
371 |
|
372 |
if return_features:
|
373 |
+
features.append(sample[:, : self.latent_channels, ...])
|
|
|
|
|
374 |
return sample, features
|
375 |
return sample
|
376 |
|