Comments (1)
Sorry for the super late reply. Because we want the current word to have 0 distance with itself, and the word in its left has -1, -2, -3 ... distance(from nearby left to further left), and the word in the right has 1, 2, 3 ... distance. However, as you already know the nn.Embedding() does not support negative indexes, therefore, the negative indexes in the left should be converted into positive ones. We conduct this conversion by adding all distance with self.origin_shift. By doing so, the distance will be something like [...., self.orign_shift-3, self.orign_shift-2, self.orign_shift-1, self.origin_shift, self.origin_shift+1, self.origin_shift+2, ...].
from tener.
Related Issues (20)
- 发现一个小bug HOT 1
- Memory out 问题 HOT 3
- Testing and predicting with TENER HOT 1
- 关于PE向量的问题,为什么要shift?以及为什么要transpose_shift?是为了计算R中的t-j吗 HOT 2
- For the unigram and bigram embedding for Chinese dataset, what if i wanna train my own set of embedding?? HOT 1
- RelativeMultiHeadAttn
- 一个关于weibo数据集的问题 HOT 2
- Can this be used on non CONLL-2003 data format? HOT 1
- 调取batch模块读取数据时出现的无限递归问题 HOT 1
- attention score计算的疑问 HOT 2
- 如何将中文数据集转为
- how to (1) Prepare the English dataset.? HOT 1
- How to split the msra dataset? HOT 1
- reproducing the results on the paper HOT 1
- 请问测试的代码没有吗 HOT 2
- 请教如何理解函数_transpose_shift HOT 1
- -
- 测试结果 HOT 1
- 训练结果问题 HOT 4
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 tener.