zhixiuye / mlman Goto Github PK
View Code? Open in Web Editor NEWACL 2019 paper:Multi-Level Matching and Aggregation Network for Few-Shot Relation Classification
Home Page: https://www.aclweb.org/anthology/P19-1277
ACL 2019 paper:Multi-Level Matching and Aggregation Network for Few-Shot Relation Classification
Home Page: https://www.aclweb.org/anthology/P19-1277
全连接层初始化代码
bias = np.sqrt(6.0 / (input_linear.weight.size(0) + input_linear.weight.size(1))) nn.init.uniform_(input_linear.weight, -bias, bias) if input_linear.bias is not None: input_linear.bias.data.zero_()
lstm层初始化代码
for ind in range(0, input_lstm.num_layers): weight = eval('input_lstm.weight_ih_l' + str(ind)) bias = np.sqrt(6.0 / (weight.size(0) / 4 + weight.size(1))) nn.init.uniform_(weight, -bias, bias) weight = eval('input_lstm.weight_hh_l' + str(ind)) bias = np.sqrt(6.0 / (weight.size(0) / 4 + weight.size(1))) nn.init.uniform_(weight, -bias, bias)
您好,根据您的ReadMe,代码运行,最后线下的效果5-way-1-shot大概78.3左右,请问正常吗,是提交后,test结果普遍比线下高吗?
Line 220 in 43cbbdb
你好,请问这个数据不存在了,是移动到哪里了吗?
您好,我重新运行了您的代码,并提交测试,在1 shot上的结果和您提供的结果有些不同,
5 way 1 shot的结果为 81.54,
10 way 1 shot的结果为 72.31,
请问是在训练1 shot时有需要修改的地方吗?
https://github.com/ZhixiuYe/MLMAN/blob/master/models/MLMAN.py#L63
input_mask = (input['mask'] != 0).float()
这里只取了非零即文本长度的mask,且bool结果都为1,所以原先data_loader里的2,3值没有用上?
https://github.com/ZhixiuYe/MLMAN/blob/master/models/data_loader.py#L172
self.data_mask[i][j] = 2
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.