Code Monkey home page Code Monkey logo

fagcn's People

Contributors

bdy9527 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fagcn's Issues

Codes for Fig 1.a

I think this work is very important for our research now. But it will be very nice of you to upload your codes for Fig. 1(a), which should be easy to reproduce.
Thanks for your reply.

About the file “synthetic.py”

Hi! Your work is of great help to my research.
Now I am reproducing Fig. 1(a), but I found that there are only test codes for the low-frequency and high-frequency signals of Fig. 1(a) in file “synthetic.py” and no test codes for the FAGCN model. I have tried to write it by myself but the effect is poor.
Could you please help me to reproduce it or supplement the file.
Waiting eagerly for your answer.

Question about edge_applying() missing 1 required positional argument: 'edges'

Hi, bdy,

I wonder if self.g.apply_edges(self.edge_applying) needs a argument to point out what edges it is as the function written below:

def edge_applying(self, edges):
        h2 = torch.cat([edges.dst['h'], edges.src['h']], dim=1) # g.srcnodes, g.srcdata['h']
        g = torch.tanh(self.gate(h2)).squeeze() # delete the redundant dimension
        e = g * edges.dst['d'] * edges.src['d']
        e = self.dropout(e)

        return {'e': e, 'm': g}

When I run g.apply_edges(self.edge_applying) independently in pytorch 1.8.1, the error edge_applying() missing 1 required positional argument: 'edges' will appear.

When I use Lambda function in the g.apply_edges as:

g.apply_edges(lambda edges: {'m': torch.tanh(gate(torch.cat([edges.dst['h'], edges.src['h']], dim=1))).squeeze()})

There is no error comes up.

Why the function defined outside, like edge_applying(edges), will lead to an error, while the inner function can avoid it?

Looking for your kind reply!

Wu Shiauthie

Some questions about the initialization pattern

Hi, Bo Deyu,
I am a PH.D. of NUDT. Rencently I have read your article FAGCN, it's really inspiring! Wonderful work! However, there is a problem that bothers me. Why do we need to reinit parameters as nn.init.xavier_normal_? What is the impact of using the default truncted norm initialization? Hope to hear from you!

About 3.1 ,some question

About the negative amplitude ,how to understand. Why,have to avoid this.
Please explain. Thanks

Reproduce the statistical results in Table 2

Great work!
We are reproducing the statistical results in Table 2 and want to know how to design the 10 runs mentioned in the article for FAGCN. Use random seeds [0,1,2,...,9] and fixed hyperparameters in Sec 5.2?

We have re-run the code with random seed=0,1,2,3 on the Cora dataset and use the same hyperparameters mentioned in Sec 5.2, but the test accuracy only get 0.803(0), 0.806(1), 0.809(2), 0.798(3) respectively.

The torch we used is 1.5.1 which is same as mentioned in the "requirement.txt".
Do I miss something? Could you please help me to reproduce the results?

Thanks!

Related code:

# Hyperparameters setting
parser = argparse.ArgumentParser()
parser.add_argument('--dataset', default='cora')    # new_squirrel, syn0
parser.add_argument('--lr', type=float, default=0.01, help='Initial learning rate.')
parser.add_argument('--weight_decay', type=float, default=1e-3, help='Weight decay (L2 loss on parameters).')
parser.add_argument('--epochs', type=int, default=500, help='Number of epochs to train.')
parser.add_argument('--hidden', type=int, default=32, help='Number of hidden units.')
parser.add_argument('--dropout', type=float, default=0.6, help='Dropout rate (1 - keep probability).')
parser.add_argument('--eps', type=float, default=0.2, help='Fixed scalar or learnable weight.')
parser.add_argument('--layer_num', type=int, default=4, help='Number of layers')
parser.add_argument('--train_ratio', type=float, default=0.6, help='Ratio of training set')
parser.add_argument('--patience', type=int, default=100, help='Patience')
args = parser.parse_args()
# Reset random seed
seed = 0  # 0,1,2,3
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
# Load dataset
data = dgl.data.CoraDataset()
edge = data.graph.edges
feat = data.features
labels = data.labels
index = np.arange(feat.shape[0])
train = index[data.train_mask.astype(bool)]
val = index[data.val_mask.astype(bool)]
test = index[data.test_mask.astype(bool)]
...

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.