Comments (7)
Hi Sara,
In response to your questions:
-
I am not sure why CTRL+C does not terminate the process, but forcing termination should not affect the trained model. If you happen to force terminate while it is saving, the latest checkpoint may be messed up, but the training script saves every few minutes by default so you could use the second most recent checkpoint for generation.
-
The
infer
method intrain_wavegan.py
produces a Tensorflow Metagraph in the training directory calledinfer.meta
. You can load this graph and use it to generate as many audio slices as you want (either one or a batch of any size). Here is a minimal code snippet appropriate for an IPython notebook:
import tensorflow as tf
from IPython.display import display, Audio
# Load the graph
tf.reset_default_graph()
saver = tf.train.import_meta_graph('infer.meta')
graph = tf.get_default_graph()
sess = tf.InteractiveSession()
saver.restore(sess, 'model.ckpt')
# Create 50 random latent vectors z
_z = (np.random.rand(50, 100) * 2.) - 1
# Synthesize G(z)
z = graph.get_tensor_by_name('z:0')
G_z = graph.get_tensor_by_name('G_z:0')
_G_z = sess.run(G_z, {z: _z})
# Play audio in notebook
display(Audio(_G_z[0, :, 0], rate=16000))
You can also see this Colab notebook for more examples. This pull request also provides a script for doing this if Notebooks aren't your thing.
from wavegan.
The training script just trains forever. It will keep training until canceled. To monitor the training in progress, please run tensorboard on the training directory: tensorboard --logdir=./train
from wavegan.
Thanks Chris for your feedback. I have two questions regarding the above:
-
CTRL+C doesn't work to terminate the process at which the training is running, therefore, does force termination have an effect on the trained model?
-
Which function should I use to generate the audio files once I cancel the training? would it produce batches of audio files or a single audio file at each run?
Thanks
-Sara
from wavegan.
How long should I train? On Nvidia GTX 1080 Ti GPU.
I also have been waiting for a long time.
from wavegan.
@yumath you need to use tensorboard to monitor training. Our training script trains forever; you should stop it when you are satisfied with the results. Please see the README.
from wavegan.
Hi Chris,
When I run the script from the pull request which you have mentioned in your comment above to generate audio files, all I get is a single tone 1 second wav file, however, every time I run it, I get the same exact tone (working with the drums dataset). I tried to change the code to produce multiple clips similar to the Collab example, however, they all seem to be exactly the same.
Any insight on how to solve this matter is greatly appreciated.
from wavegan.
Hi Sara,
Apologies for the delay. Are you using different latent (z) vectors every time you run it? If so, the only reason the sounds would be the same is that the model has become extremely overfit to a single example. How big is your training dataset? Can you compare the waveforms (e.g. sum(abs(waveformA-waveformB))) to see if they're actually identical?
Cheers,
Chris
from wavegan.
Related Issues (20)
- Invalid argument: You must feed a value for placeholder tensor 'ngl' with dtype int32 HOT 2
- Can we change (increase) amount of training data in between sessions?
- Last layer of the generator in the CNN (size 16384) HOT 1
- Tensorflow2.4 support HOT 5
- Multi-channel audio doesn't work with --data_num_channels 2 in Jupyter Lab HOT 1
- Can you fix collab
- Generate MFCC
- Can't get this to run anymore - Need information on environment
- Single-frequency noisy sound in the result HOT 4
- Reading WaveGAN models using Tensorflow C API
- Code for continue training model from last ckpt? HOT 1
- Training starts but no updates are dumping to checkpoints? HOT 1
- Training higher quality audio for ~5 seconds
- Overtraining HOT 2
- Can't train the model
- Can't run HOT 4
- OSS License compatibility question
- Massive Tensorflow Error Message When Attempting to Train WaveGAN
- int() argument must be a string, a bytes-like object or a real number, not 'Tensor'
- Broken Piano Dataset Download Link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wavegan.