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

search.sh has error #38

Open
akihiro0000 opened this issue May 11, 2023 · 1 comment
Open

search.sh has error #38

akihiro0000 opened this issue May 11, 2023 · 1 comment

Comments

@akihiro0000
Copy link

Prepare the environment according to the procedure, I try "sh search.sh" in the Architecture Search 1st steps.

Traceback (most recent call last):
  File "/home/test/anaconda3/envs/leastereo/lib/python3.8/site-packages/PIL/Image.py", line 2813, in fromarray
    mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 192), '|u1')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "search.py", line 303, in <module>
    trainer.training(epoch)
  File "search.py", line 211, in training
    self.summary.visualize_image_stereo(self.writer, input1, target, output, global_step)
  File "/home/test/test/LEAstereo/utils/summaries.py", line 56, in visualize_image_stereo
    writer.add_image('Predicted disparity', pr_image, global_step)
  File "/home/test/anaconda3/envs/leastereo/lib/python3.8/site-packages/tensorboardX/writer.py", line 667, in add_image
    image(tag, img_tensor, dataformats=dataformats), global_step, walltime)
  File "/home/test/anaconda3/envs/leastereo/lib/python3.8/site-packages/tensorboardX/summary.py", line 288, in image
    image = make_image(tensor, rescale=rescale)
  File "/home/test/anaconda3/envs/leastereo/lib/python3.8/site-packages/tensorboardX/summary.py", line 330, in make_image
    image = Image.fromarray(tensor)
  File "/home/test/anaconda3/envs/leastereo/lib/python3.8/site-packages/PIL/Image.py", line 2815, in fromarray
    raise TypeError("Cannot handle this data type: %s, %s" % typekey) from e
TypeError: Cannot handle this data type: (1, 1, 192), |u1

Do you have any idea?

@natalieschreder
Copy link

I'm running into this issue too! I know it's been a while, but did you ever figure out what the problem was?

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

2 participants