thunlp / gp-gnn Goto Github PK
View Code? Open in Web Editor NEWThis project forked from prokil/gp-gnn
Code and dataset of ACL2019 Paper: Graph Neural Networks with Generated Parameters for Relation Extraction.
This project forked from prokil/gp-gnn
Code and dataset of ACL2019 Paper: Graph Neural Networks with Generated Parameters for Relation Extraction.
Hello, excuse me P@K Can the index code be published? Or how to calculate this index
在our_models.py的107行中,您定义# rnn_output shape: batch * MAX_EDGES_PER_GRAPH, max_sent_len, hidden
我设置的是batch_size = 10 所以size = (720, 36, 512)
108行代码
rnn_result = torch.cat([rnn_output[:, -1, :self.p['units1']], rnn_output[:, 0, self.p['units1']:]], dim=1).view(sentence_input.size()[0], MAX_EDGES_PER_GRAPH, -1)
我的理解是: 在108行中, 相当于截取lstm中第35个word的前0到255的embedding,和第0个word的第256到512的embedding。经过tocrh,cat变成维度(720,2,256)最后再view一下变成(10, 72,512 ),view相当于把同一个sentence中的第一个word和最后1个word的各自256维度拼接。这个第一个词后半embedding后最后一个词的前半embedding的拼接。作为graph edge的value
我的问题:如果我理解的没有错,请问这样做有什么依据吗?它对应了论文中哪一条公式?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.