-
Notifications
You must be signed in to change notification settings - Fork 13
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
The use of linear dynamics #5
Comments
Hi Yilin, In the official implementation of the paper, we use a linearity_weight of 0.0 (so there's no linear dynamics penalty). I have noticed that using the linear dynamics (where linearity weight is greater than 0.0) does help to have a more smooth latent space, but this can cause "holes" in the latent space that are undesirable. For the best results, I would recommend combining both, to get the best of both world:
During the optimization step of subgoals, everytime you sample images from VAE B (by decoding the latents to images using VAE B's decoder), you can then encode it back to the latent space of VAE A (using VAE A's encoder). If this is confusing, let me know and I can elaborate further. Alternatively, you could simply a standard VAE (no linear dynamics) for everything, like we did in the paper. |
Thanks for the explanation! I will train a standard VAE first. |
The reason why we encode(decode(z)) rather than use z directly is that the Q function was trained on the means of image encodings. So given a randomly sampled latent z from a Gaussian, it might not correspond to the mean of a posterior distribution. To ensure this is the case, we decode z into an image first, then encode the image to get a posterior distribution, and finally consider the mean of this posterior distribution. The reprojection network is there to make this process faster, since decoding and encoding back can be computationally costly. The reprojection network is trained with supervised learning, with (z, mean(encode(decode(z)))) pairs. We didn't actually use the reprojection network in the paper, and I don't recall how well it works. Our standard implementation doesn't use it. |
Thanks! I will follow the standard implementation. |
Hi Soroush, sorry to bother you again. When I want to run the code on my Ubuntu 18.04, cuda 10.2 server, I find the version incompatible with your code. Therefore, I create the docker image, following the installation guide and build docker docker image with your Dockerfile. However, the pretrain-vae part works fine with "pm" environment, but when I try to generate data for "pnr" environment, it returns the error of "found 0 gpus for rendering ...... fail to initialize OpenGL". Do you know any solution to this? Below is the entire error message: Found 0 GPUs for rendering. Using device 5. Additionally, when I run in the docker container to test render(),
|
A few things:
|
Is there any way to workaround this? 3.I think GPU works because when I do |
I'm not immediately sure how to address the issue. I think there's something in the dockerfile (https://github.com/snasiriany/leap/blob/master/docker/Dockerfile) that is incompatible with your hardware. Since the GPU works, I think the issue is strictly with the rendering software. I think the first step is in investigating the error message you posted For faster development, I'd recommend running the docker image interactively with |
Hi, I am trying to use your code for the pointmass_uwall task and thank you for making your code public. I have a question about the linear_loss part in the vae code. In the train_vae.py, the use_linear_dynamics is set to True but the linearity_weight is set to 0. Therefore, in the VAE training, the linear_loss is not actually added to the total loss.
In the pointmass_uwall task, do you change the linearity_weight to some number(not 0.0) in the pre-training of the VAE?
The text was updated successfully, but these errors were encountered: