-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: loss = recons_loss + kld_weight * kld_loss #95
Comments
Hi there, |
Second question
`class MyDataset(Dataset):
In vae.yaml `model_params: data_params: exp_params: trainer_params: logging_params: ` |
I think the issue is simply that there is an additionnal 'd' at the line "kld_weight" in the YAML file? Making it a string, hence difficult ot handle :) |
You Are Wonderful! This problem is solved. |
And if I want to make the reconstruction sample better, can you give me some advice? |
This is the question of all Machine Learning :D Be sure to test a few different hyperparameters, check that the validation loss decrease, and so on. As long as both train and val losses do not seem to be able to decrease anymore, it means that the model as achieve its best (with the chosen hyperparam). Otherwise, give the training a few more rounds :) |
Okay, I will try it :) |
Can you train to achieve good results? I can't get good results with my own dataset |
|
Hi @sunny12345-bit , if you have some particular issue with the code, it would be best to open a dedicated issue :) It will help to help you! |
Hmm, I have been busy with other assignments and haven't started to revise them :-( |
Hi, my reconstruction results become better, do you get the good results? |
May I ask which parameters you changed to achieve better results |
I just have changed all parameters to the origin, and then changed the parameters of the image size to my data image size. |
Hi
When I use my dataset (3,192,192), and I change some parameters,
According to debug, these value before
loss = recons_loss + kld_weight * kld_loss
kld_loss: tensor(0.4086, device='cuda:1', grad_fn=)
kld_weight: 0.00025d
recons_loss: tensor(0.1564, device='cuda:1', grad_fn=)
If I set the kld_weight to 1, it worked, but it didn't work out so well:
Sample:
Reconstruction:
One of my dataset:
The kld_weight=1 is okay? How to make the reconstruction and sample better?
Thanks!
The text was updated successfully, but these errors were encountered: