Giter VIP home page Giter VIP logo

cp-vae's People

Contributors

billy-inn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cp-vae's Issues

RunTime error with Amazon baseline

Hi,
I'm trying to run the repo code with the Amazon and Yelp datasets before trying it on some of my own. I am running into the following error with the Amazon dataset and the baseline model. (I set torch.autograd.set_detect_anomaly(True) beforehand.)

  File "/h/vkpriya/CP-VAE/run_baseline.py", line 91, in <module>
    main(args)
  File "/h/vkpriya/CP-VAE/run_baseline.py", line 63, in main
    valid_loss = model.fit()
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/aggressive_vae.py", line 189, in fit
    self.train(epoch)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/aggressive_vae.py", line 89, in train
    logits, kl = self.vae.loss(batch_data_enc)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/vae.py", line 41, in loss
    z, KL = self.encode(x, nsamples)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/vae.py", line 35, in encode
    return self.encoder.encode(x, nsamples)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/base_network.py", line 72, in encode
    mu, logvar = self.forward(inputs)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/base_network.py", line 158, in forward
    mean, logvar = self.linear(hidden_repr).chunk(2, -1)
  File "/h/vkpriya/condaenvs/pyt_cu/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/h/vkpriya/condaenvs/pyt_cu/torch/nn/modules/linear.py", line 87, in forward
    return F.linear(input, self.weight, self.bias)
  File "/h/vkpriya/condaenvs/pyt_cu/torch/nn/functional.py", line 1612, in linear
    output = input.matmul(weight.t())
 (print_stack at /pytorch/torch/csrc/autograd/python_anomaly_mode.cpp:60)
Vocabulary size: 60229
Experiment dir: /h/vkpriya/CP-VAE/outputs/baseline/amazon-amazon/20201201-223426
Traceback (most recent call last):
  File "/h/vkpriya/CP-VAE/run_baseline.py", line 91, in <module>
    main(args)
  File "/h/vkpriya/CP-VAE/run_baseline.py", line 63, in main
    valid_loss = model.fit()
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/aggressive_vae.py", line 189, in fit
    self.train(epoch)
  File "/scratch/ssd001/home/vkpriya/CP-VAE/models/aggressive_vae.py", line 128, in train
    loss.backward()
  File "/h/vkpriya/condaenvs/pyt_cu/torch/tensor.py", line 198, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/h/vkpriya/condaenvs/pyt_cu/torch/autograd/__init__.py", line 100, in backward
    allow_unreachable=True)  # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1024, 64]], which is output 0 of TBackward, is at version 32; expected version 31 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

I am trying to debug it on my end, but any help would be appreciated!
(P.S: I get the same error with the baseline and CP-VAE models on my own datasets as well)

Thank you!

Question about latent space manipulation

Hello. I understand that you move the source text vector to either 1 std, 2 std and so on based on the type selected. But could you please let me know how do you make sure that the manipulation lands the sentence to the target style?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.