-
Notifications
You must be signed in to change notification settings - Fork 424
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: (1, 1, 12), |u1 #80
Comments
我也遇到了同样的问题,环境是使用的google的colab平台
请问你解决了吗? |
您好,我在py3.7的版本下没有解决该问题,后来换到了2.7是可以正常运行的。
| |
赵柳
|
|
邮箱:18130039283@163.com
|
签名由 网易邮箱大师 定制
On 06/26/2020 22:31, XueiuR wrote:
我也遇到了同样的问题,环境是使用的google的colab平台
报错如下
/content/gdrive/My Drive/code/AttnGAN/code/miscc/utils.py:236: RuntimeWarning: invalid value encountered in true_divide
one_map = (one_map - minV) / (maxV - minV)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2680, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 12), '|u1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 146, in <module>
gen_example(dataset.wordtoix, algo) # generate images for customized captions
File "main.py", line 83, in gen_example
algo.gen_example(data_dic)
File "/content/gdrive/My Drive/code/AttnGAN/code/trainer.py", line 514, in gen_example
[attn_maps[j]], att_sze)
File "/content/gdrive/My Drive/code/AttnGAN/code/miscc/utils.py", line 245, in build_super_images2
PIL_att = Image.fromarray(np.uint8(one_map))
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2682, in fromarray
raise TypeError("Cannot handle this data type: %s, %s" % typekey)
TypeError: Cannot handle this data type: (1, 1, 12), |u1
请问你解决了吗?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
好的 感谢! |
好的!如果您跑出来了结果请告诉我一下修改方法!感谢!
| |
赵柳
|
|
邮箱:18130039283@163.com
|
签名由 网易邮箱大师 定制
On 06/27/2020 01:59, XueiuR wrote:
好的 感谢!
我的是python3.6,最后将25625612的向量截断为2562563了,然后可以运行,不知道会不会产生比较大的影响
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
我将 |
我刚才也试了使用python2.7运行,效果会比经过我修改后使用python3生成的图片,从直观效果上看会好很多 |
您好,我最近也在研究attngan 也遇到了这个问题一直不知道怎么解决?方便加个好友吗 ,相互学习一下,QQ 1014976349 |
你好,我也出现了这个问题,请问你是怎么改的代码呢?可以加我吗?qq是 |
Hi, regarding the issue, replace the line |
您好,我在训练的时候,出现这个问题
File "/home/anaconda3/envs/pt/lib/python3.7/site-packages/PIL/Image.py", line 2716, in fromarray
raise TypeError("Cannot handle this data type: %s, %s" % typekey)
TypeError: Cannot handle this data type: (1, 1, 12), |u1
我安装的PIL7.1.2的版本,是因为版本的问题么?
请问有人遇到过同样的问题么?如何解决的呢?谢谢
The text was updated successfully, but these errors were encountered: