在调试pytorch-faster-rcnn中遇到的问题:出现以下问题
(1) File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1884, in fromarray
raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type
(2) AssertionError: size of input tensor and input format are different
我的配置环境为:Anaconda3+pytorch 0.4+tensorboardX+tensorflow
我的解决办法:(仅供参考)
修改 anaconda3/lib/python3.6/site-packages/tensorboardX中summary.py的函数dataformats参数为‘HWC’
def image(tag, tensor, rescale=1, dataformats='HWC'):