杂乱无章的记录

想法:在GCN层内部加入残差进行特征变换,在层之间加入注意力矩阵对不同层的输出赋予权重,最后加一个激活函数进行分类。

在此之前,想弄明白一个东西,GCN的tricks有哪些

参考论文《Bag of Tricks for Node Classification with Graph Neural Networks》

配套的ogbn-arxiv代码:https://github.com/Espylapiza/dgl/tree/master/examples/pytorch/ogb/ogbn-arxiv

希望我自己能实验

一、特征变换部分

加入负二阶差分以及恒等映射

二、传播过程

想要通过一个机制,赋予不同层之间一个权重再输出

1.将所有层得到的特征进行加和

2. 将所有层得到的特征输入给注意力机制,

3.hop-attention(aero-GNN)

层、模型的实例调用

1. GCN:

直接使用PyG的GCNConV

GCNConv(in_channels, out_channels)

定义模型GCNnet

class GCNnet(nn.Module):
    def __init__(self, dataset, hidden=256, num_layers=3):
.
.
.
    def forward(self, data):
.
.
.
    return x

调用:

model = GCNNet(dataset=dataset, hidden=256, num_layers=3)

2. GCNII

GCNIIdenseConv(hidden_channels, hidden_channels,bias=norm)

class GCNIIdense_model(torch.nn.Module):
    def __init__(self, in_channels, hidden_channels, out_channels, num_layers,dropout,alpha,norm):
.
.
.
    def forward(self,data):
..


#调用
model = GCNIIdense_model(data.x.size(-1), args.hidden_channels,
                    dataset.num_classes, args.num_layers,
                    args.dropout,args.alpha,args.norm).to(device)

3.GCN_res_sum

model = GCN_res(dataset=dataset, hidden=128, num_layers=8)

动手部分

模型/准确率训练准确率测试准确率
GCN_res_sum_8layer77.80±0.3972.83±0.26
GCN_3layer78.21 ± 1.1471.69 ± 0.34

clenshawGCN_4layer

70.18 ± 0.0768.13 ± 0.10
clenshawgcn_9layer72.21 ± 1.01 67.48 ± 0.27
GCN_clen_sum
GCNII_1672.54±0.17
GCN_clen_attention

1. GCN_res

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值