Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: #72

Closed
abhishekkritarth opened this issue Apr 26, 2018 · 4 comments
Closed

NotImplementedError: #72

abhishekkritarth opened this issue Apr 26, 2018 · 4 comments

Comments

@abhishekkritarth
Copy link

abhishekkritarth commented Apr 26, 2018

Hi,
@r9y9
@LucianZala
@taras-sereda
@Kyubyong

while running this code in Google Co-lab I'm getting Not Implemented Error

text = "Some have accepted this as a miracle without any physical explanation"
N = 15
print("Synthesizing "{}" with {} different speakers".format(text, N))
for speaker_id in range(N):
print(speaker_id)
tts(model, text, speaker_id=speaker_id, figures=False)

Synthesizing "Some have accepted this as a miracle without any physical explanation" with 15 different speakers
0

NotImplementedError Traceback (most recent call last)
in ()
4 for speaker_id in range(N):
5 print(speaker_id)
----> 6 tts(model, text, speaker_id=speaker_id, figures=False)

in tts(model, text, p, speaker_id, fast, figures)
1 def tts(model, text, p=0, speaker_id=0, fast=True, figures=True):
2 from synthesis import tts as _tts
----> 3 waveform, alignment, spectrogram, mel = _tts(model, text, p, speaker_id, fast)
4 if figures:
5 visualize(alignment, spectrogram)

/content/deepvoice3_pytorch/synthesis.py in tts(model, text, p, speaker_id, fast)
64 # Greedy decoding
65 mel_outputs, linear_outputs, alignments, done = model(
---> 66 sequence, text_positions=text_positions, speaker_ids=speaker_ids)
67
68 linear_output = linear_outputs[0].cpu().data.numpy()

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
489 result = self._slow_forward(*input, **kwargs)
490 else:
--> 491 result = self.forward(*input, **kwargs)
492 for hook in self._forward_hooks.values():
493 hook_result = hook(self, input, result)

/content/deepvoice3_pytorch/deepvoice3_pytorch/init.py in forward(self, text_sequences, mel_targets, speaker_ids, text_positions, frame_positions, input_lengths)
77 mel_outputs, alignments, done, decoder_states = self.seq2seq(
78 text_sequences, mel_targets, speaker_embed,
---> 79 text_positions, frame_positions, input_lengths)
80
81 # Reshape

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
489 result = self._slow_forward(*input, **kwargs)
490 else:
--> 491 result = self.forward(*input, **kwargs)
492 for hook in self._forward_hooks.values():
493 hook_result = hook(self, input, result)

/content/deepvoice3_pytorch/deepvoice3_pytorch/init.py in forward(self, text_sequences, mel_targets, speaker_embed, text_positions, frame_positions, input_lengths)
122 encoder_outputs, mel_targets,
123 text_positions=text_positions, frame_positions=frame_positions,
--> 124 speaker_embed=speaker_embed, lengths=input_lengths)
125
126 return mel_outputs, alignments, done, decoder_states

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
489 result = self._slow_forward(*input, **kwargs)
490 else:
--> 491 result = self.forward(*input, **kwargs)
492 for hook in self._forward_hooks.values():
493 hook_result = hook(self, input, result)

/content/deepvoice3_pytorch/deepvoice3_pytorch/deepvoice3.py in forward(self, encoder_out, inputs, text_positions, frame_positions, speaker_embed, lengths)
282 assert text_positions is not None
283 self.start_fresh_sequence()
--> 284 outputs = self.incremental_forward(encoder_out, text_positions, speaker_embed)
285 return outputs
286

/content/deepvoice3_pytorch/deepvoice3_pytorch/deepvoice3.py in incremental_forward(self, encoder_out, text_positions, speaker_embed, initial_input, test_inputs)
376 if self.speaker_proj1 is not None:
377 w = w * F.sigmoid(self.speaker_proj1(speaker_embed)).view(-1)
--> 378 text_pos_embed = self.embed_keys_positions(text_positions, w)
379 keys = keys + text_pos_embed
380

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
489 result = self._slow_forward(*input, **kwargs)
490 else:
--> 491 result = self.forward(*input, **kwargs)
492 for hook in self._forward_hooks.values():
493 hook_result = hook(self, input, result)

/content/deepvoice3_pytorch/deepvoice3_pytorch/modules.py in forward(self, x, w)
49 if isscaler or w.size(0) == 1:
50 weight = sinusoidal_encode(self.weight, w)
---> 51 return self._backend.Embedding.apply(
52 x, weight,
53 padding_idx, self.max_norm, self.norm_type,

/usr/local/lib/python3.6/dist-packages/torch/nn/backends/backend.py in getattr(self, name)
8 fn = self.function_classes.get(name)
9 if fn is None:
---> 10 raise NotImplementedError
11 return fn
12

NotImplementedError:

@rvnth
Copy link

rvnth commented Apr 26, 2018

This seems to be occurring when we try to train too. Here is the traceback.

Traceback (most recent call last): File "train.py", line 992, in <module> train_seq2seq=train_seq2seq, train_postnet=train_postnet) File "train.py", line 662, in train input_lengths=input_lengths) File "/home/i/DeepVoice3/Wavenet/.dv3wn/lib/python3.5/site-packages/torch/nn/modules/module.py", line 491, in __call__ result = self.forward(*input, **kwargs) File "/home/i/DeepVoice3/Wavenet/deepvoice3_pytorch/deepvoice3_pytorch/__init__.py", line 79, in forward text_positions, frame_positions, input_lengths) File "/home/i/DeepVoice3/Wavenet/.dv3wn/lib/python3.5/site-packages/torch/nn/modules/module.py", line 491, in __call__ result = self.forward(*input, **kwargs) File "/home/i/DeepVoice3/Wavenet/deepvoice3_pytorch/deepvoice3_pytorch/__init__.py", line 124, in forward speaker_embed=speaker_embed, lengths=input_lengths) File "/home/i/DeepVoice3/Wavenet/.dv3wn/lib/python3.5/site-packages/torch/nn/modules/module.py", line 491, in __call__ result = self.forward(*input, **kwargs) File "/home/i/DeepVoice3/Wavenet/deepvoice3_pytorch/deepvoice3_pytorch/deepvoice3.py", line 310, in forward text_pos_embed = self.embed_keys_positions(text_positions, w) File "/home/i/DeepVoice3/Wavenet/.dv3wn/lib/python3.5/site-packages/torch/nn/modules/module.py", line 491, in __call__ result = self.forward(*input, **kwargs) File "/home/i/DeepVoice3/Wavenet/deepvoice3_pytorch/deepvoice3_pytorch/modules.py", line 51, in forward return self._backend.Embedding.apply( File "/home/i/DeepVoice3/Wavenet/.dv3wn/lib/python3.5/site-packages/torch/nn/backends/backend.py", line 10, in __getattr__ raise NotImplementedError NotImplementedError

@r9y9
Copy link
Owner

r9y9 commented Apr 26, 2018

Thank you for the report, but please do not ping random people. This is probably due to pytorch upgraded to v0.4 from 0.3. I will look into it this weekend.

@r9y9 r9y9 added bug torch and removed bug labels Apr 26, 2018
@r9y9 r9y9 closed this as completed in dbaeaae Apr 27, 2018
@r9y9
Copy link
Owner

r9y9 commented Apr 27, 2018

Fixed the colab notebook.

engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
@mennatallah644
Copy link

mennatallah644 commented Feb 22, 2019

hi
@r9y9
@LucianZala
@taras-sereda
@Kyubyong
@rvnth
@engiecat
i have tried to change the version of pytorch but i still got the same error ,how did you fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants