Git Product home page Git Product logo

Comments (11)

chrisdonahue avatar chrisdonahue commented on May 19, 2024

Hi there.

Can you give me a bit more context? Did you run the script to extract the moments (spectrogram bin means and variances) from your dataset? Was there any output from that script (it may take a while)? Can you locate the moments.pkl file?

python train_specgan.py moments ./train \
	--data_dir ./data/dir_with_mp3s \
	--data_moments_fp ./train/moments.pkl

from wavegan.

karanpareek96 avatar karanpareek96 commented on May 19, 2024

Hi Chris,

Thanks for getting back to me.

I am currently running SpecGAN using the srun functionality. I have imported all the required packages to execute the file. Yes, I did run the moments script to extract the mean and variance but I get an error saying that the moments.pkl file cannot be found.

Do you recommend that I update any existing libraries in my system to achieve success?

PS: Big fan of your work :)

from wavegan.

karanpareek96 avatar karanpareek96 commented on May 19, 2024

screen shot 2019-02-28 at 5 37 47 pm

from wavegan.

chrisdonahue avatar chrisdonahue commented on May 19, 2024

I think this means that the loader is not successfully loading any data (the spectrogram array is empty). How many audio files does the script say it found? Are they all the exact same format? Do you have librosa installed?

To get an idea of where exactly the script is breaking, change lines 202/203 to:

    while True:
      try:
        _X_lmag = sess.run(X_lmag)
      except Exception as e:
        print(e)
        break

from wavegan.

karanpareek96 avatar karanpareek96 commented on May 19, 2024

Hi Chris,

I implemented the code that you suggested and it worked. I had made a big blunder while running the program. My directory extension wasn't correct, so instead of importing audio files, it was importing the folders, resulting in the error.

Thanks for your help!

from wavegan.

youngjung avatar youngjung commented on May 19, 2024

Hi Chris,

I have the same issue computing moments from SC09 dataset.

Traceback (most recent call last):
  File "train_specgan.py", line 758, in <module>
    moments(fps, args)
  File "train_specgan.py", line 612, in moments
    _X_lmags = np.concatenate(_X_lmags, axis=0)
ValueError: need at least one array to concatenate

Below is from your checklist above.
len(fps) = 2494
fps[0] = '/home/data/sc09/valid/Eight_060cd039_nohash_0.wav'
librosa==0.6.2 is installed.
and except Exception as e: print(e) gave me

End of sequence
	 [[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[1,16384,1,1]], output_types=[DT_FLOAT]](IteratorFromStringHandleV2)]]
	 [[node loader/ExperimentalFunctionBufferingResourceGetNext (defined at /home/wavegan/loader.py:198)  = ExperimentalFunctionBufferingResourceGetNext[output_types=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:GPU:0"](loader/ExperimentalFunctionBufferingResource)]]
	 [[{{node Log/_9}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_50_Log", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

Could you help me solving this issue?

from wavegan.

chrisdonahue avatar chrisdonahue commented on May 19, 2024

Hi @youngjung. I'm not 100% sure what's going on. Are you using the correct version of tensorflow (1.12.0)? Can you try installing scipy and using --data_fast_wav as a command line input to use scipy instead of librosa?

from wavegan.

youngjung avatar youngjung commented on May 19, 2024

Yes I am using tf-1.12.0

$ pip show tensorflow-gpu
Name: tensorflow-gpu
Version: 1.12.0

I tried

$ python train_specgan.py moments ./experiments     --data_dir ~/data/sc09/valid/     --data_moments_fp ./experiments/moments.pkl --data_fast_wav
Found 2494 audio files in specified directory

and it still gives me

End of sequence
	 [[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[1,16384,1,1]], output_types=[DT_FLOAT]](IteratorFromStringHandleV2)]]
	 [[node loader/ExperimentalFunctionBufferingResourceGetNext (defined at /home/wavegan/loader.py:198)  = ExperimentalFunctionBufferingResourceGetNext[output_types=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:GPU:0"](loader/ExperimentalFunctionBufferingResource)]]
	 [[{{node Log/_9}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_50_Log", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
stat...
len = 0
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)
ValueError: need at least one array to concatenate

from wavegan.

sanchita-ghose avatar sanchita-ghose commented on May 19, 2024

@youngjung Have you solved the issue? I am facing the same error.

from wavegan.

fredbuhl avatar fredbuhl commented on May 19, 2024

I'm having the same issue here with working with train_specgan.py and sc09/train. Can we get a reopen? Happy to help...

python packages: (I'm using virtualenv--very helpful!); Ubuntu 16.04:
absl-py==0.9.0
astor==0.8.1
audioread==2.1.8
cffi==1.14.0
cycler==0.10.0
decorator==4.4.2
gast==0.3.3
grpcio==1.29.0
h5py==2.10.0
importlib-metadata==1.6.1
joblib==0.14.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.1.0
librosa==0.6.2
llvmlite==0.32.1
Markdown==3.2.2
matplotlib==3.0.2
numba==0.47.0
numpy==1.16.4
protobuf==3.12.2
pycparser==2.20
pyparsing==2.4.7
python-dateutil==2.8.1
resampy==0.2.2
scikit-learn==0.22.2.post1
scipy==1.0.0
six==1.15.0
SoundFile==0.10.3.post1
tensorboard==1.12.2
tensorflow-gpu==1.12.0
termcolor==1.1.0
Werkzeug==1.0.1
zipp==1.2.0

from wavegan.

hellog2n avatar hellog2n commented on May 19, 2024

I have same error.

from wavegan.

Related Issues (20)

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.