fast-wavenet icon indicating copy to clipboard operation
fast-wavenet copied to clipboard

generator = Generator(model) in demo produces error

Open denisfitz57 opened this issue 8 years ago • 6 comments

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

denisfitz57 avatar Sep 23 '16 04:09 denisfitz57

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?

tomlepaine avatar Sep 25 '16 18:09 tomlepaine

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

jkyl avatar Oct 11 '16 00:10 jkyl

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

giovannic avatar Oct 12 '16 08:10 giovannic

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 avatar Jan 03 '17 15:01 bhtucker

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.

bhtucker avatar Jan 03 '17 23:01 bhtucker

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

ishandutta2007 avatar Nov 05 '18 09:11 ishandutta2007