Giter Site home page Giter Site logo

c-rnn-gan's Introduction

Implementation of C-RNN-GAN.

Publication: Title: C-RNN-GAN: Continuous recurrent neural networks with adversarial training Information: http://mogren.one/publications/2016/c-rnn-gan/

Bibtex:

@inproceedings{mogren2016crnngan, title={C-RNN-GAN: A continuous recurrent neural network with adversarial training}, author={Olof Mogren}, booktitle={Constructive Machine Learning Workshop (CML) at NIPS 2016}, pages={1}, year={2016} }

A generative adversarial model that works on continuous sequential data. Implementation uses Python and Tensorflow, and depends on https://github.com/vishnubob/python-midi for MIDI file IO.

Requirements

tensorflow, python-midi (or python3-midi)

How to run?

python rnn_gan.py --datadir "relative-path-to-data" --traindir "path-to-generated-output" --feed_previous --feature_matching --bidirectional_d --learning_rate 0.1 --pretraining_epochs 6

Author: Olof Mogren (olofmogren) Contributors: Dhruv Sharma (dhruvsharma1992)

c-rnn-gan's People

Contributors

olofmogren 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c-rnn-gan's Issues

Memory Leak after every session.run

Hi,
I tried to run rnn-gan.py with command line
--model small --datadir data/examples/ --traindir data/traindir/ --select_validation_percentage 20 --select_test_percentage 20
but this program run out of memory.

And I found that during pre-training period every session.run in function run_epoch leaked some memory when debugging. Every 10 "session.run"s cost about 70M RAM so that after 3 epoch of pre-training this program run out of memory.
I don't know how it leaked my memory. I hope anyone could solve this error.

I worked on 8GB memory, GTX850M, Ubuntu 16.04

Thanks
Lvgen

What version of Python?

Hi,
Thanks for sharing your code. I was just wondering what version of Python have you used to implement your code? I tried a couple of different versions (e.g., 2.7.9, 2.7.13, 3.5.0, and 3.5.2), but each had their own problems. For example, the pythonMidi is sucessfully installed with 2.7.9, but it does not support TensorFlow, while 3.5.2 work with TensorFlow, but not pythonMidi! So, I am wondering which version of Python have you used which is compatible with both pythonMidi and TensorFlow.
Thanks,
Nima

Tensorflow issue

I am trying to run the code with Tensorflow 1.15.0 but I am having issues. Could you please let me know what version of tensorflow are you using here?

Keras

Hi.
Great work. Could you please provide a Keras implementation of the model? I had an idea for testing the model for signal synthesis of some kind but I'm not familiar with TF.
Thanks

How to generate new music?

Thank you very much for sharing. I am a student who has just come into contact with music generation. I found that the code seems to only train the network , But not generate new music with midi format. How can I generate new midi format music?

Tensorflow version

Hi,
Great work with the code! My question is which Tensorflow version did you use to compile it and is there a 1.3.0 version available?

Thanks in advance

A question relate to the D structure

Hi, I realize a rnn-gan on a sequence data rencently.
But I found the D_loss is close to zero fast and G_loss not converged for a long time when I
add a RNN in D-net.And everything is OK when I discard the rnn structure in D-net.Why that could be
happened?Or should I use the bidirectional rnn structure as your paper used?

Problems in tensorflow 1.2.0

Hi, I'd like to run your rnn_gan.py, but probably because I'm using the latest version of tensorflow,
I have a problem. The script doesn't work.
I modified several lines because in tensorflow 1.2.0 they change the ordering, notation, and so on.
Also, since we don't have tf.nn.bidirectional_rnn in tensorflow 1.2.0, I tried other bidirectional rnn.
Then I got some errors, (mostly ValueErrors, rank incorrespondence, different input shape, etc...)

I'm using Ubuntu 14.04 with GeForce GTX TITAN X (12GB).
Is it because of the different version of tensorflow? or Am I missing some points?
Also, could you tell me which version of tensorflow you're using?

Thanks.

Bugs report for your code

Hi, my name is Shixian Wen. I am currently a computer science Ph.D. student at University of Southern California.
Your code is great, but I found some small bugs that could be some problems.
1:
in line #250 you cannot define MultiRNNCell([lstm_cell] * FLAGS.num_layers_g, state_is_tuple=True) like this. you should use something like [cell for _ in range(config.num_layers)] in https://github.com/tensorflow/models/blob/master/tutorials/rnn/ptb/ptb_word_lm.py official tutorial.
The reason is here
https://stackoverflow.com/questions/45456116/valueerror-trying-to-share-variable-enco-gru-cell-gates-kernel-but-specified-s

2:
you did not update the state c and state h for discriminator and generator:
You were trying to update the state in generator from #557 to #559 for generator, but you comment it out.
You did not update the state of discriminator at all.
see the code in ptb_word_lm.py #402 to #402
The reason is here:
https://stackoverflow.com/questions/40991975/how-are-the-batches-iterated-in-the-ptb-lstm-example-of-tensorflow/40998815#40998815

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.