-
Notifications
You must be signed in to change notification settings - Fork 129
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
state = state[:, :, 0]*0.299 + state[:, :, 1]*0.587 + state[:, :, 2]*0.114 IndexError: index 2 is out of bounds for axis 2 with size 2 #8
Comments
met the same error |
Run under GPU environment, do not run under CPU environment |
Run under GPU environment, do not run under CPU environment
…--
At 2020-05-01 01:22:07, "Jiancong Gao" <[email protected]> wrote:
met the same error
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi, later I found it is a problem with the input data. I re-ran the program and it worked. |
Would you like to send me your modified code and I will test it. Let's work together to write a paper, publish it, and achieve retrieval by EI or SCI. OK?
…--
At 2020-05-11 05:35:27, "Jiancong Gao" <[email protected]> wrote:
Run under GPU environment, do not run under CPU environment
…
-- At 2020-05-01 01:22:07, "Jiancong Gao" [email protected] wrote: met the same error — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, later I found it is a problem with the input data. I re-ran the program and it worked.
Also I modify your work a little bit to try adaptive attention and it worked pretty well. Brilliant code by you. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
when I run the following command
python train.py --data=configs/data.json --vocab=configs/vocab.json --training=configs/training.json --model=configs/model.json --output=results/full/
the result is
Loaded 76322 formulas from data/train.formulas.norm.txt
Bucketing the dataset...
Traceback (most recent call last):
File "train.py", line 61, in
main()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "train.py", line 36, in main
form_prepro=vocab.form_prepro)
File "/home/rootx/me/im2latex-master/model/utils/data_generator.py", line 76, in init
self._set_data_generator()
File "/home/rootx/me/im2latex-master/model/utils/data_generator.py", line 84, in _set_data_generator
self._data_generator = self.bucket(self._bucket_size)
File "/home/rootx/me/im2latex-master/model/utils/data_generator.py", line 104, in bucket
for idx, (img, formula, img_path, formula_id) in enumerate(self):
File "/home/rootx/me/im2latex-master/model/utils/data_generator.py", line 201, in iter
result, skip = self._process_instance(example)
File "/home/rootx/me/im2latex-master/model/utils/data_generator.py", line 173, in _process_instance
img = self._img_prepro(img)
File "/home/rootx/me/im2latex-master/model/utils/image.py", line 52, in greyscale
state = state[:, :, 0]*0.299 + state[:, :, 1]*0.587 + state[:, :, 2]*0.114
IndexError: index 2 is out of bounds for axis 2 with size 2
root@rootx-virtual-machine:/home/rootx/me/im2latex-master#
How to fix it?
Thanks a lot !
The text was updated successfully, but these errors were encountered: