Skip to content
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

VAE loss and classification accuracy #18

Open
yuyingg0921 opened this issue Jan 22, 2019 · 4 comments
Open

VAE loss and classification accuracy #18

yuyingg0921 opened this issue Jan 22, 2019 · 4 comments

Comments

@yuyingg0921
Copy link

yuyingg0921 commented Jan 22, 2019

hi :) sorry to bother you again
I tried train_vae.py to train a vae model without competition layer but got high loss (60-70).
(and dimension is 128)
earlystopping happened in about 20-50 epoch though I already tried a larger patience.
The loss includes kld and reconstruction error but is this loss value in normal scale?
and then I used pred_vae.py to predict 20news document embeddings.
but after running run_classifier.py, I can only get about 22% classification accuracy.

Do you have any suggestion for improving the vae model!?
thank you

@hugochan
Copy link
Owner

@yuyingg0921 You should be able to get reasonably good results using VAE. Can you share your hyper-parameters when training the model?

@yuyingg0921
Copy link
Author

yes. most parameters are default value.
batch size =100
validation size = 1000
epoch = 100
dimensions = [128,128] , [512/512]
I also tried with and without a competition layer.

train_vae.py:
python train_vae.py -i output_20news/train.corpus -nd 128 128 -sm model_vae
image
with larger earlystopping patience:
image

run_classifier.py:
image
image

@Somayeh12
Copy link

Hi,
I run your code with 20newsgroup, I get the earlystopping too. it stops at epoch 33/100 and the loss is 0.48.
Any suggestion?

@hugochan
Copy link
Owner

@yuyingg0921 @Somayeh12 You might want to try running the code using the same TensorFlow version as mentioned in requirements.txt. See #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants