zengjichuan / tmn Goto Github PK
View Code? Open in Web Editor NEWSource code of TMN (Topic Memory Network)
Source code of TMN (Topic Memory Network)
你好,可以完善一下readme嘛,代码一直有bug
你好,源代码中缺少记忆力机制这一部分,请问可以提供一下完整的嘛
你好,大神. 我想问下词向量的来源是? (是自己训练的还是 有公开的词向量?)。谢谢了
1.通过np.arange(TOPIC_NUM)构造每个topic的索引输入,再重复BATCH次,通过embedding构建主题语义空间。
2.将主题语义空间映射到统一语义空间,至此,wt_emb的形状是[BATCH,TOPIC_NUM,DIM]。
3.将seq_input映射到词嵌入空间,再映射到统一语义空间,x的形状是[BATCH,SEQ_LEN,DIM]
4.通过dot,计算match得分,match的形状是[BATCH,SEQ_LEN,TOPIC_NUM]
5.将ntm生成的represent_mu与match得分add,topic_sum的形状是[BATCH,SEQ_LEN,TOPIC_NUM]
6.加入残差和全连接层,完成一个hop的计算。
跟论文中描述的:通过W生成S和Target矩阵,再计算P和R,有很大出入。
Hi,
I have trained this model use tmn_data.txt in data directory, but the result is 'val acc 0.8059, f1 0.8058', which is 0.851 in your paper. Is there some change about parameters or train set? i have do nothing when training.
The paper is "Topic Memory Networks for Short Text Classification"
This is the last output message when training:
850/850 [==============================] - 0s 277us/step
ntm estimated perplexity upper bound on validation set: 2149.354
No improvement in epoch 436
Epoch 437/800 training cls
106/106 [==============================] - 17s 159ms/step
cls train loss: 0.0082
No improvement in epoch 437 with val acc 0.8059, f1 0.8059
Epoch 438/800 training cls
106/106 [==============================] - 18s 168ms/step
cls train loss: 0.0087
No improvement in epoch 438 with val acc 0.8082, f1 0.8088
Epoch 439/800 training cls
106/106 [==============================] - 17s 161ms/step
cls train loss: 0.0077
No improvement in epoch 439 with val acc 0.7941, f1 0.7956
Epoch 440/800 training cls
106/106 [==============================] - 17s 159ms/step
cls train loss: 0.0090
No improvement in epoch 440 with val acc 0.8047, f1 0.8060
Epoch 441/800 training cls
106/106 [==============================] - 17s 163ms/step
cls train loss: 0.0077
No improvement in epoch 441 with val acc 0.8000, f1 0.7990
Epoch 442/800 training cls
106/106 [==============================] - 17s 161ms/step
cls train loss: 0.0076
No improvement in epoch 442 with val acc 0.8059, f1 0.8058
你好~可以提供TagMyNews完整的数据集嘛
can you please provide the complete information about the training and the testing dataset.
hello, good job!
could you share the complete dataset used in your paper(included training/dev/test set)
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.