Comments (5)
I am also interested to that question. Have you tried to randomly assign self.A_in and then try to call _create_xxx_embed() again to generate ua_embeddings, ea_embeddings?
from knowledge_graph_attention_network.
I think @chengaojie0011 is right. Because self.A_in
is not a placeholder in graph, the assignment will not work, and never affect the network.
knowledge_graph_attention_network/Model/KGAT.py
Lines 465 to 466 in c03737b
if you set this exactly self.A_in
to zero or one, the performance of the model will stay unchanged.
from knowledge_graph_attention_network.
Sorry for the late reply after the busy weeks.
- Please distinguish the self.A_values, which is set as a placeholder, and self.A_in, which is used to feed the values of self.A_values.
- I have tested the code and show the value in self.A_in (the first 20 values for limited space) in the following picture. As the figure shows, the self.A_in is updated as the epoch increases.
Hope this is helpful for you @chengaojie0011 @johnnyjana730 .
from knowledge_graph_attention_network.
Sorry for the late reply after the busy weeks.
- Please distinguish the self.A_values, which is set as a placeholder, and self.A_in, which is used to feed the values of self.A_values.
- I have tested the code and show the value in self.A_in (the first 20 values for limited space) in the following picture. As the figure shows, the self.A_in is updated as the epoch increases.
Hope this is helpful for you @chengaojie0011 @johnnyjana730 .
Many thanks for your kind reply. The value of self.A_in has updated in class KGAT(object), but it doesn't update in the model because Tensorflow builds a static graph before a model can run.
I'm not sure If I've explained this problem clearly. If you try to replace self.A_in with any value, you may find the model will still work, and the results of the model also not change.
from knowledge_graph_attention_network.
I have tested three variants, setting self.A_in's values as all zeros, all ones, and random values. The training performance is shown as follows:
Some observations:
- The results of three variants w.r.t. four evaluation metrics are different. It thus verifies that the model.update_attentive_A works.
- However, the differences are not that significant. We attribute this to some possible reasons: (1) the attention values are iteratively updated, rather than jointly updated with the other parameters. (2) simply applying the attention networks is insufficient to model the relational information. We have an ongoing work towards solving these issues and will later release the code when the work is finished.
Hope this is helpful. Thanks for your insightful comments.
from knowledge_graph_attention_network.
Related Issues (20)
- I have a question about kg_final.txt HOT 1
- I have a question about memory growth HOT 1
- ERROR: loss@phase2 is nan HOT 1
- Yelp dataset is missing HOT 2
- Problem of reproducing baseline model
- Question about data partition: did you use validation data for selecting best models?
- 卡在epoch0
- 采用TransR方法训练实体表示的作用? HOT 1
- 关于RippleNet 的ratings_final.txt生成问题 HOT 1
- how to make kg_final.txt HOT 3
- IndexError: too many indices for array
- How to get the embeddings(mf.npz) under the pretrain folder?
- UnicodeDecodeError HOT 1
- how to print the attention score with tensorflow?
- how to calculate the %improv?
- Item_list.txt is missing spaces in the yelp2018
- Which epoch should I use when I use bprmf to generate embedding in pretrain?
- about without pretraining
- Performance on yelp2018 with KGAT
- Clarification Needed on kg_final.txt Data Contents 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 knowledge_graph_attention_network.