thuiar / MMSA

MMSA is a unified framework for Multimodal Sentiment Analysis.
MIT License
642 stars 104 forks source link

关于复现的结果问题 #38

Closed LingFengGold closed 2 years ago

LingFengGold commented 2 years ago

我直接使用您的代码,没有做任何的改动,试着在MOSI运行了bert-mag和mult。结果如下。

_Model,Has0_acc_2,Has0_F1_score,Non0_acc_2,Non0_F1_score,Mult_acc_5,Mult_acc7,MAE,Corr,Loss _bertmag,"(79.24, 4.4)","(88.35, 2.75)","(94.46, 1.58)","(97.15, 0.84)","(77.52, 1.7)","(77.52, 1.7)","(38.22, 3.04)","(67.88, 1.44)","(38.31, 3.02)" mult,"(70.96, 9.93)","(82.62, 6.83)","(91.86, 4.26)","(95.7, 2.33)","(73.65, 0.69)","(73.65, 0.69)","(48.8, 0.85)","(54.8, 2.24)","(48.77, 0.83)"

这与result-stat.md和其对应论文中的结果都相差甚远,请问这是为什么呢?

Columbine21 commented 2 years ago

您好,您这个运行结果应该是很有问题,Non0_acc_2,Non0_F1_score,不会上90。很有可能是发生了数据泄漏,请您仔细确认一下

LingFengGold commented 2 years ago

您好,您这个运行结果应该是很有问题,Non0_acc_2,Non0_F1_score,不会上90。很有可能是发生了数据泄漏,请您仔细确认一下

谢谢,这个我再确认一下

LingFengGold commented 2 years ago

File "/home/st/anaconda3/envs/MMSA/lib/python3.9/site-packages/MMSA/models/subNets/transformers_encoder/position_embedding.py", line 76, in forward return self.weights[device].index_select(0, positions.view(-1)).view(bsz, seq_len, -1).detach() RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

现在一运行python -m MMSA -m mult -d mosi --gpu-ids 0就会报上面的这个错,请问如何解决呀

FlameSky-S commented 2 years ago

现在一运行python -m MMSA -m mult -d mosi --gpu-ids 0就会报上面的这个错,请问如何解决呀

您好,这个问题与张量在内存中的存储方式有关。当前您可以在view()前面加上.contiguous()即可解决问题。这个问题将在后续版本中修复。

LingFengGold commented 2 years ago

.contiguous()

发生错误的位置在MMSA包中,我做了修改的话,如果再次执行unstall和pip install .的指令,这个问题还会再次出现。

FlameSky-S commented 2 years ago

如果使用pip install .的方式安装的话,修改clone到本地的代码然后重新安装就可以了

HandsomeCBX commented 10 months ago

您好,请问我为什么会报错,pip install MMSA之后的下一部,将代码放在任意py文件,我放入了,为什么复现的时候还会报错