Comments (2)
您好!
- 具体是如何实现的:args.use_wight主要是控制subsampling_weight的计算,subsampling_weight的计算方式是对一个triple累计它的实体和关系对出现的次数,然后对这个次数做倒数并开根号得到对应triple的subsampling_weight,最后在loss中作为权重。
- 目的是什么:可以看到,与这个triple有关的数据出现的频率越高,subsampling_weight越小,乘上subsampling_weight后针对这个triple的loss所占的比例就越小。它的目的是为了减弱低频triple与高频triple数据间存在的不平衡现象,因为某些triple的实体和关系对可能出现的频率很高,而另一些triple的实体和关系对出现的频率很低,计算score时高频的影响会很大,存在不平衡的现象,但是低频的信息也应该被模型很好地学习。use_weight是一个常用的trick,经过测试在一些模型上可以显著提高效果。
- 有没有相关的论文介绍:它的方法来源于Word2vec中的Subsampling,对Subsampling方法的直观理解可以参考这篇博客。
from neuralkg.
您提供的信息对我很有帮助,谢谢您的回复!
from neuralkg.
Related Issues (20)
- 运行demo报错 HOT 2
- 保存预测三元组 HOT 1
- where is the parameter of epoch HOT 3
- colab示例demo无法运行 HOT 2
- can‘t run main.py successfully HOT 1
- 模型是否存在early stop HOT 1
- 你好,这个会有jvm api 出来吗?例如Scala api,和pytorch能配合使用吗 HOT 1
- lmdb.MemoryError: dataset/CCKS_train_subgraph: Cannot allocate memory HOT 1
- windows平台上CPU占用和磁盘读写异常 HOT 1
- CompGCN模型问题 HOT 1
- ccks参数不可用 HOT 3
- 执行脚本出现错误 HOT 1
- main函数中似乎有路径错误 HOT 3
- raise ValueError(f'The provided lr scheduler "{scheduler}" is invalid') ValueError: The provided lr scheduler "<torch.optim.lr_scheduler.MultiStepLR object at 0x00000214EB756C70>" is invalid HOT 12
- 请问脚本文件夹中有的脚本有v1v2等不同版本,内容只是指定的GPU不同 HOT 1
- 运行demo.py报错RuntimeError: Early stopping conditioned on metric `Eval_mrr` which is not available. Pass in or modify your `EarlyStopping` callback to use any of the following: `Train|loss`, `Eval|mrr`, `Eval|hits@10` HOT 2
- 链接预测mode问题
- Multi-process for dataloader when set num_workers larger than 0 will raise an error by RGCN model HOT 2
- 关于wandb使用 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuralkg.