yanxinzju / CSS-VQA

Counterfactual Samples Synthesizing for Robust VQA
76 stars 18 forks source link

import cPickle 在python3 环境有问题 #14

Open alice-cool opened 2 years ago

alice-cool commented 2 years ago

我改成了import _pickle as cPickle 然后在数据预处理时,报错 vals = list(map(float, vals[1:])) feb077d81bf6621670285c5cb2f554b 但是在运行main 时又出现新的编码问题 utf-8 image 通过 fe=torch.load('data/rcnn_feature/'+str(img_id)+'.pth', encoding="ISO-8859-1")['image_feature'] classifier nn.Dropout(dropout, inplace=False) 又跑通了

最大 57.98 与文中的最好值相差1个点,是正常现象吗? image

pjy0422 commented 1 year ago

Thank you very much. I had the same error and thanks to you I solved it.