shikiw / OPERA

[CVPR 2024 Highlight] OPERA: Alleviating Hallucination in Multi-Modal Large Language Models via Over-Trust Penalty and Retrospection-Allocation
MIT License
244 stars 22 forks source link

关于可视化 #32

Closed yubo97 closed 1 month ago

yubo97 commented 2 months ago

论文中可视化summary tokens的代码方便提供吗

shikiw commented 2 months ago

你好,

可以参考vis.ipynb

OliverLeeXZ commented 1 month ago

您好,我运行可视化代码的时候报错TypeError: tuple indices must be integers or slices, not tuple,然后溯源回去是generic.py中else:
return self.to_tuple()[k] 这里报的错,k在这里的输入是数据类型是切片,值是(slice(None, None, None), slice(None, 138, None)),请问为什么会报这个错,怎么解决呢?谢谢