Comments (5)
Can you print out len(fps)
to see how large it is? I'm not sure but it seems like the script is not finding all of your files.
from wavegan.
I am having same issue, Printing the len(fps), it is 860 (My total training examples)
Traceback (most recent call last): File "train_specgan.py", line 760, in <module> moments(fps, args) File "train_specgan.py", line 614, in moments _X_lmags = np.concatenate(_X_lmags, axis=0) File "<__array_function__ internals>", line 6, in concatenate ValueError: need at least one array to concatenate
from wavegan.
@hinash88 have you fixed the error?
from wavegan.
So I've been able to generate the moments, but the fact is this code is just not all that viable anymore unless you're running an older (1.x
) version of TF. So here's what I did.
- Run update script on
train_specgan.py
tf_upgrade_v2 --infile train_specgan.py --outfile train_specgan_v2.py
-
This will produce some errors, as the
contrib
library no longer exists in tf. So for every instance ofcontrib
intrain_specgan.py
you have to change it from:tf.contrib.signal
totf.signal
-
Then because of the way tensorflow works, nothing will actually be done until the session is allowed to run, and because tensorflow switched to eager execution at some point, this session to create the moments will actually never be run, and this is the cause of the
need at least one array to concatenate
error. So, the simplest fix is to add the following line at the top of the file:
tf.compat.v1.disable_eager_execution()
I hope this helps. I don't know a lot about tensorflow, as I try to stick to pytorch, so I'm not sure if the changes I've made are in line with the best practices, but it seems to be working for me. If you are stuck in a 1.x
version then I can't help you, I don't think. Best of luck!
from wavegan.
I tried what you have mentioned but I am still getting the error (need at least one array to concatenate).
I am using tensorflow gpu 1.14
Cuda compilation tools, release 10.0, V10.0.130
CUDA Version: 11.0
from wavegan.
Related Issues (20)
- Transfer Learning using pre-trained checkpoints HOT 2
- 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'
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.