Lion-ZS / OTKGE

29 stars 5 forks source link

关于cal_ot函数的一些问题 #2

Open Tunan-Li opened 1 year ago

Tunan-Li commented 1 year ago

您好,感谢您的工作!请问一下,在这个函数中,这个number=10的意义是什么呀?

github

然后就是这个函数的返回值应该对应的是论文中的这个等式前面两部分,不知道我有没有理解错,但是从形式上看缺少了对角阵的部分,可以解释下嘛?

image

期待您的回复!

Lion-ZS commented 1 year ago

您好,感谢您的关注。在计算多模态信息向结构信息对齐的过程中,依次计算每个嵌入的最优传输矩阵会使得计算量非常庞大,这里对每个batch中抽取了number=10个作为每个batch的替代,当然number也可以采用其他的数值。对于第二个问题,st_dim可以看作对角阵部分,self.scale是一个放缩参数,作为超参数调参;为了加速收敛,delta_ot的self.scale我们设置为对角矩阵的倒数,相乘为1,所以delta_ot前面就没有对角矩阵了。

在 2022-11-23 14:08:23,"emonade" @.***> 写道:

您好,感谢您的工作!请问一下,在这个函数中,这个number=10的意义是什么呀?

然后就是这个函数的返回值应该对应的是论文中的这个等式前面两部分,不知道我有没有理解错,但是从形式上看缺少了对角阵的部分,可以解释下嘛?

期待您的回复!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

yoyozz88 commented 1 year ago

你好,我想问下delta_ot是怎么定义?是如何取值的?我在你们所有代码里只找到这个变量名。谢谢。

Lion-ZS commented 1 year ago

你好,delta_ot定义在cal_ot()函数中。在实际传参的时候,传入的为self.mats_img或self.mats_ling。其分别定义在model.py的第151和153行。

在 2023-07-17 03:01:08,"Yoyo" @.***> 写道:

你好,我想问下delta_ot是怎么定义?我在你们所有代码里只找到这个变量名。谢谢。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

yoyozz88 commented 1 year ago

你好,delta_ot定义在cal_ot()函数中。在实际传参的时候,传入的为self.mats_img或self.mats_ling。其分别定义在model.py的第151和153行。 在 2023-07-17 03:01:08,"Yoyo" @.> 写道: 你好,我想问下delta_ot是怎么定义?我在你们所有代码里只找到这个变量名。谢谢。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

谢谢回答!另外请问,这边rank所指代的是啥?因为我看到rank后面用得还挺多的。

image image
Lion-ZS commented 1 year ago

您好,rank指的是维度。

在 2023-07-17 18:10:55,"Yoyo" @.***> 写道:

你好,delta_ot定义在cal_ot()函数中。在实际传参的时候,传入的为self.mats_img或self.mats_ling。其分别定义在model.py的第151和153行。 在 2023-07-17 03:01:08,"Yoyo" @.> 写道: 你好,我想问下delta_ot是怎么定义?我在你们所有代码里只找到这个变量名。谢谢。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

谢谢回答!另外请问,这边rank所指代的是啥?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>