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

Issues while executing play_with_model.py #70

Open
bishwaraj13 opened this issue Feb 20, 2021 · 0 comments
Open

Issues while executing play_with_model.py #70

bishwaraj13 opened this issue Feb 20, 2021 · 0 comments

Comments

@bishwaraj13
Copy link

I execute: python play_with_model.py INTERSPEECH-T-BRNN-pre.pcl

It prompts me for text. I type: welcome to the tournament i am your host gabriel

I get following error:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else\
ValueError: cannot reshape array of size 500 into shape (10,256)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "play_with_model.py", line 109, in
punctuate(predict, word_vocabulary, punctuation_vocabulary, reverse_punctuation_vocabulary, reverse_word_vocabulary, text, f_out, show_unk)
File "play_with_model.py", line 45, in punctuate
y = predict(to_array(converted_subsequence))
File "/usr/local/lib/python3.6/dist-packages/theano/compile/function_module.py", line 917, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/usr/local/lib/python3.6/dist-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/usr/local/lib/python3.6/dist-packages/six.py", line 702, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/dist-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else
ValueError: cannot reshape array of size 500 into shape (10,256)
Apply node that caused the error: Reshape{2}(AdvancedSubtensor1.0, Join.0)
Toposort index: 33
Inputs types: [TensorType(float64, matrix), TensorType(int64, vector)]
Inputs shapes: [(10, 50), (2,)]
Inputs strides: [(400, 8), (8,)]
Inputs values: ['not shown', array([ 10, 256])]
Outputs clients: [[InplaceDimShuffle{0,x,1}(Reshape{2}.0)]]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "play_with_model.py", line 93, in
net, _ = models.load(model_file, 1, x)
File "/workspace/video_archive/gpu_user/bishwaraj/punctuator2/models.py", line 79, in load
p=p
File "/workspace/video_archive/gpu_user/bishwaraj/punctuator2/models.py", line 208, in init
x_emb = self.We[x.flatten()].reshape((x.shape[0], minibatch_size, n_emb))

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

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

No branches or pull requests

1 participant