Giter Club home page Giter Club logo

how_attentive_are_gats's Issues

Reproduce the GAT v1 attention matrix

Thanks for your great contribution!!
I'm confused about Figure 1 (a) in your paper. Which layer of GAT is this attention matrix in? Is the attention matrix of all layers the same? Is the attention matrix between different heads in one layer like this?

Best regards

(Possible) bug when graph.is_block is True

Sorry for bothering again.

This might be dumb, but I am reading the DGL implementation to understand it, and I really don't get L272.

if self.share_weights:
feat_dst = feat_src
else:
feat_dst = self.fc_dst(h_src).view(
-1, self._num_heads, self._out_feats)
if graph.is_block:
feat_dst = feat_src[:graph.number_of_dst_nodes()]

The only thing that makes sense to me is that the rhs was supposed to be feat_dst as well, and this is some bug. Otherwise, it does not make sense to set share_weights=False when graph.is_block is True. Am I missing something?

Publishing code for reproduction

Thank you for your great contribution!
Currently, we are doing research with GAT, GAT-V2 (and Graph Transformers) and try to reproduce your results on the ogbn-datasets.
Do you already know when you will publish the rest of the code?

Best regards

Reproducing results on proteins

Hi!

I was trying to reproduce the results on the proteins dataset on a V100 GPU, and I am running into a few problems. First I had some issues with the BatchSampler (samplers cannot be passed to iterative datasets), so I just removed it (I am using the latest version of dgl, since 0.6 is not available with my CUDA version).

After fixing that, I came across this error message
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 64])
in line 98 of models.py

for i in range(self.n_layers):
h = self.convs[i](subgraphs[i], h).flatten(1, -1)
if h_last is not None:
h += h_last[: h.shape[0], :]
h_last = h
h = self.norms[i](h)
h = self.activation(h, inplace=True)
h = self.dropout(h)

Is this error related with removing the BatchSampler? And which tensor size is it expected at that line?

Thanks for the help

Number of features does not match the number of nodes when num_heads > 1

Hi, I am using the DGL based code of the project. When I set num_heads = 2 to initialize the GATv2Conv layers I receive the following error

dgl._ffi.base.DGLError: Expect number of features to match number of nodes (len(u)). Got 568 and 284 instead

I guess the attention heads are not being aggregated? I noticed the DGL version does not have an is_concat option like in the annotated code demo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.