tomlepaine / fast-wavenet

Speedy Wavenet generation using dynamic programming :zap:
GNU General Public License v3.0
1.76k stars 307 forks source link

generator = Generator(model) in demo produces error #5

Open denisfitz57 opened 8 years ago

denisfitz57 commented 8 years ago

when running the demo using tensorflow .10, python 3.5 (anaconda), commit 20485a2 I get the following :

Make Generator.

TypeError Traceback (most recent call last)

in () ----> 1 generator = Generator(model) /home/denis/fast-wavenet/wavenet/models.py in **init**(self, model, batch_size, input_size) 99 count += 1 100 --> 101 outputs = _output_linear(h) 102 103 out_ops = [tf.argmax(tf.nn.softmax(outputs), 1)] /home/denis/fast-wavenet/wavenet/layers.py in _output_linear(h, name) 170 171 def _output_linear(h, name=''): --> 172 with tf.variable_scope(name, reuse=True): 173 w = tf.get_variable('w')[0, :, :] 174 b = tf.get_variable('b') /home/denis/anaconda3/lib/python3.5/contextlib.py in **enter**(self) 57 def **enter**(self): 58 try: ---> 59 return next(self.gen) 60 except StopIteration: 61 raise RuntimeError("generator didn't yield") from None /home/denis/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py in variable_scope(name_or_scope, default_name, values, initializer, regularizer, caching_device, partitioner, custom_getter, reuse, dtype) 1350 """ 1351 if default_name is None and not name_or_scope: -> 1352 raise TypeError("If default_name is None then name_or_scope is required") 1353 if values is None: 1354 values = [] TypeError: If default_name is None then name_or_scope is required
tomlepaine commented 8 years ago

Do you still have this error with the newest updates? Also I haven't tested this with python 3. Can you try using it with python 2.7?

jkyl commented 8 years ago

I encounter an identical error with the latest version of fast-wavenet and python2.7. Will update if I find a fix.

giovannic commented 8 years ago

This is likely a tensorflow backward-compatibility issue: tensorflow/tensorflow#4576

bhtucker commented 7 years ago

I also have this issue.

I don't know TF that well but this looks pretty solvable by simply giving a name to the variable scope where the output tensor is created. Not sure what else needs to be in that scope, though.

Would happily pair with someone to make a workaround!

bhtucker commented 7 years ago

I've put up a PR that works on Python 2.7 and TF 0.11.0.

I'll test it this evening on Python 3.5, but this fix makes sense with the TF issue @giovannic posted, so there shouldn't be any language version differences.

ishandutta2007 commented 6 years ago

@bhtucker @denisfitz57 @giovannic @jkyl if you have succeeded in training it and have the model with you can you please share the model.