chrisdonahue / wavegan

WaveGAN: Learn to synthesize raw audio with generative adversarial networks
MIT License
1.33k stars 280 forks source link

Can't run #116

Open okanduzyel opened 2 years ago

okanduzyel commented 2 years ago

Hi,

I cloned the project and I guess installed all required libraries but unfortunately can not run it. I got this output while I want to run.

(env_pytorch) okanduzyel@Okan-MacBook-Pro waveganv2 % python train_wavegan.py train ./train \                                                   
        --data_dir /Users/okanduzyel/Downloads/IDMT-SMT-DRUMS-V2/audio
Found 155 audio files in specified directory
Traceback (most recent call last):
  File "train_wavegan.py", line 653, in <module>
    infer(args)
  File "train_wavegan.py", line 244, in infer
    samp_z_n = tf.placeholder(tf.int32, [], name='samp_z_n')
AttributeError: module 'tensorflow' has no attribute 'placeholder'
(env_pytorch) okanduzyel@Okan-MacBook-Pro waveganv2 % 
okanduzyel commented 2 years ago

I tried a bunch of things and it gives always the same error.

(base) okanduzyel@Okan-MacBook-Pro wavegan % python train_wavegan.py train ./train \
        --data_dir /Users/okanduzyel/Downloads/wavegan-pytorch-master/wavegan-pytorch/sc09/train
Found 18620 audio files in specified directory
Traceback (most recent call last):
  File "/Users/okanduzyel/Downloads/wavegan/train_wavegan.py", line 653, in <module>
    infer(args)
  File "/Users/okanduzyel/Downloads/wavegan/train_wavegan.py", line 244, in infer
    samp_z_n = tf.placeholder(tf.int32, [], name='samp_z_n')
AttributeError: module 'tensorflow' has no attribute 'placeholder'
(base) okanduzyel@Okan-MacBook-Pro wavegan % 
mattjwarren commented 2 years ago

wha versions of tf and python do you have?

atthom commented 2 years ago

This is because you are using TensorFlow 2.X and wavegan require tensorflow-gpu==1.12.0

mattjwarren commented 1 year ago

I have created an updated fork of this repository migrated to run on Tensorflow 2. You may have more success getting it to run in modern environments, especially if you are aiming to train on newer GPU hardware. https://github.com/mattjwarren/wavegan