NSCaching icon indicating copy to clipboard operation
NSCaching copied to clipboard

Code for NSCaching

Results 6 NSCaching issues
Sort by recently updated
recently updated
newest added

作者你好,N_1过程中使用伯努利采样的时候,有两个相关的问题: 1. 在BernCorrupter类中,得到的bern_prob全部都是0.5,这是因为统计频率的过程中没有相加,所以相当于均匀采样了 ![1655735749(1)](https://user-images.githubusercontent.com/43950183/174625415-7158fb82-6bb9-464c-8ace-01497d75bda9.png) 2. 在base_model.py文件中,对于selection的类型选择,原始代码中是selection = torch.bernoulli(prob).type(torch.ByteTensor),但是取反操作后~selection,原义是selection为1时,替换head,selection为0时,~selection为0,替换tail,但是目前的实现中全部正样本的tail都会替换,因为~selection最后的值是255或者254 (如果方便的话,可否加个微信细致讨论一下细节呢)

首先非常感谢您一直以来的回复! (图3是我求梯度的平均L2范数的代码)这次我在跑您的论文中的梯度的平均L2范数随着epoch的增大的变化中,发现梯度一直在增大,然后我注意到会不会是数据没有归一化的原因,包括上次问您的负样本重复率一直是0会不会也是这个原因。如果您还有记忆的话,希望可以替我解答一下,十分感谢! ![image](https://user-images.githubusercontent.com/93383782/156570090-faf2fca6-f8c8-4148-aa87-8f468a9c3b2a.png) ![image](https://user-images.githubusercontent.com/93383782/156569424-a648a824-117f-4b10-a4f4-40c786d536e3.png) ![image](https://user-images.githubusercontent.com/93383782/156570069-c48e40a9-1462-413e-8e41-43e574ad08e1.png)

你好,我NSCaching+IS跑RR出来的结果都是0%,能帮我看下问题出在哪吗,可以请教下您是怎么写的代码吗? ![Uploading image.png…]()

学长你好,请问一下这里的L2正则化梯度在代码里怎么获取,代码里好像是直接用的pytorch的adam优化器,我csdn上找了好久没找到方法,能请学长指导一哈吗?十分感谢!!! ![image](https://user-images.githubusercontent.com/93383782/156278942-f9db9b4e-5b70-4f03-a22d-5066c8e4b729.png) ![image](https://user-images.githubusercontent.com/93383782/156278972-b60207ca-5bb4-4aeb-b8d5-e931d0411216.png)

你好,请问一下论文《NSCaching_Simple_and_Efficient_Negative_Sampling_for_Knowledge_Graph_Embedding》中的RR(Repeat Ratio)和NZL(Non Zero Loss Ratio)是怎么跑出来的? ![image](https://user-images.githubusercontent.com/93383782/153992250-980c593b-a1b8-4dd9-8146-13253192dd4d.png)

你好,请问没有test部分的代码吗