Coder Social home page Coder Social logo

eliorav / writing-style-transfer Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 5.0 149.85 MB

writing style transfer using cycle gan

Python 0.25% HTML 77.85% Jupyter Notebook 21.91%
cycle-gan generative-adversarial-network machine-translation python pytorch sentiment-analysis seq2seq writing-style-transfer yelp-reviews

writing-style-transfer's Issues

how to cite this work

Hello, thanks for your amazing work! Currently I am trying to extend your work and add some experiment on it. How I can cite your work?
Thanks!

How to load saved Models

Hi, thanks a lot for your contribution

I was trying to load the saved models
d_a = torch.load(path)

but then the way it is loaded is different when compared to the model you created in the google collab network
Screen Shot 2022-07-26 at 2 28 18 PM

Can you please let me know if there is any other way to load the saved models?

Thank you!

What changes need to be done to train on custom dataset?

Hey,
I have a custom dataset wherein I have some text data in the X domain and some in the Y domain in the form of text files. I want to train this model on my custom dataset. Can you please tell me what changes need to be done to incorporate this?

Google Colab notebook currently not working

Hello! First of all, thank you for the contribution!

The error

I was trying to see what the model comes up to, so I went for the Google Colab linked.

However, there may be a torchversion problem (just my hypothesis), as I am getting a **dimension mismatch error while initializing the generators and discriminators (the cells to "Prepare the networks"). See log below.

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

<ipython-input-15-a6589232276f> in <module>()
----> 1 g_ab, g_ba, d_a, d_b = get_cycle_gan_network(G_INPUT_DIM, G_OUTPUT_DIM, device, PAD_IDX, SOS_IDX, True, True)

2 frames

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
    845         if len(error_msgs) > 0:
    846             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
--> 847                                self.__class__.__name__, "\n\t".join(error_msgs)))
    848         return _IncompatibleKeys(missing_keys, unexpected_keys)
    849 

RuntimeError: Error(s) in loading state_dict for Seq2Seq:
	size mismatch for encoder.embedding.weight: copying a param with shape torch.Size([9887, 256]) from checkpoint, the shape in current model is torch.Size([9889, 256]).
	size mismatch for decoder.embedding.weight: copying a param with shape torch.Size([9887, 256]) from checkpoint, the shape in current model is torch.Size([9889, 256]).
	size mismatch for decoder.out.weight: copying a param with shape torch.Size([9887, 512]) from checkpoint, the shape in current model is torch.Size([9889, 512]).
	size mismatch for decoder.out.bias: copying a param with shape torch.Size([9887]) from checkpoint, the shape in current model is torch.Size([9889]).

Discussion

The Colab notebook should be updated in order for it to be useful. Do you have any idea what may be happening here? @eliorav

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.