haihuangcode / CMG

The official implementation of Achieving Cross Modal Generalization with Multimodal Unified Representation (NeurIPS '23)
167 stars 2 forks source link

code/src/model/main_model_2.py, line 790 #7

Open Sacamore opened 4 months ago

Sacamore commented 4 months ago

您好,我在阅读您的代码时似乎发现了一个问题, 它在 code/src/model/main_model_2.py 中的第790行:

        for i in unactivated_indices:
            self.embedding[i] = activated_quantized[random.randint(0,len(activated_indices)-1)] + torch.Tensor(256).uniform_(-1/1024, -1/1024).cuda()

我认为这里应该是 (-1/1024, 1/1024) 而不是(-1/1024, -1/1024) 同样的问题还出现在977行和1152行 希望这对您的工作有所帮助 :D

haihuangcode commented 4 months ago

非常感谢您的仔细阅读,我稍后将修复这个问题。