-
Notifications
You must be signed in to change notification settings - Fork 487
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
TypeError: Cannot handle this data type #108
Comments
上げました |
Torchのバージョンもあるかもしれません、 |
Although this time PIL error, because the cause was found out, I will report it here. Please do not make tensorboardX version 1.2 or later. |
Nice catch, @usasho . Similar error reported for |
…rement Fixes #108 until tensorboardX deals with the writer.add_image() problem
Solved in tensorboardX v1.6. |
I'm seeing this in tensorboardX 1.7:
|
Anyone else seeing this? Should this be reopened? |
Was caught in google colab environment.
|
Getting same error in google colab.
|
I was having the same issue when feeding the image in HxWxC format. I switched to CxHxW and it solved it. |
6it [00:09, 1.66s/it]
Loss: 1.4190080761909485
4it [00:06, 1.57s/it]Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2150, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 75), '|u1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "https://t.co/oY6LXrEgZv", line 983, in
train_seq2seq=train_seq2seq, train_postnet=train_postnet)
File "https://t.co/oY6LXrEgZv", line 717, in train
eval_model(global_step, writer, device, model, checkpoint_dir, ismultispeaker)
File "https://t.co/oY6LXrEgZv", line 414, in eval_model
writer.add_image(tag, np.uint8(cm.viridis(np.flip(alignment, 1).T) * 255), global_step)
File "/usr/local/lib/python3.5/dist-packages/tensorboardX/writer.py", line 412, in add_image
self.file_writer.add_summary(image(tag, img_tensor), global_step, walltime)
File "/usr/local/lib/python3.5/dist-packages/tensorboardX/summary.py", line 205, in image
image = make_image(tensor, rescale=rescale)
File "/usr/local/lib/python3.5/dist-packages/tensorboardX/summary.py", line 243, in make_image
image = Image.fromarray(tensor)
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2153, in fromarray
raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type
The text was updated successfully, but these errors were encountered: