MeteoSwiss / MeteoSwiss/ldcast

Some questions about VAE

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
146
Forks
19
PR merge metrics
No merged PRs in 30d

Description

thank you for a very good job! I have a question about VAE;
In autoenc.py 48-52

```
def _loss(self, batch):
(x,y) = batch
while isinstance(x, list) or isinstance(x, tuple):
x = x[0][0]
(y_pred, mean, log_var) = self.forward(x)

rec_loss = (y-y_pred).abs().mean()
kl_loss = kl_from_standard_normal(mean, log_var)

total_loss = rec_loss + self.kl_weight * kl_loss

return (total_loss, rec_loss, kl_loss)
```
(y_pred, mean, log_var) = self.forward(x)

I'm a little confused here
```
(x,y) = batch
while isinstance(x, list) or isinstance(x, tuple):
x = x[0][0]
(y_pred, mean, log_var) = self.forward(x)
```
```
(x,y) = batch
while isinstance(x, list) or isinstance(x, tuple):
x = x[0][0]
(y_pred, mean, log_var) = self.forward(y)
```
Is it self.forward(y) or self.forward(x)? Is the shape of x here representing the 4 frames of the condition? If this is the number of 4 frames of the condition, then y is the number of frames to be predicted. Which should be used here? self.forward(y)?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with autoenc.py lines 48-52 and trace the VAE _loss call to determine the intended meanings and shapes of x and y. Compare those inputs with the forward method's contract and the surrounding training code. Done means the issue has a clear explanation of whether forward should receive x or y and what each tensor represents.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.