BUPT-GAMMA / OpenHGNN

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL.
Apache License 2.0
816 stars 139 forks source link

个别模型minibatch训练问题 #202

Closed Hasakii-ghj closed 4 months ago

Hasakii-ghj commented 8 months ago

❓ Questions and Help

在使用自己的数据训练iehgcn时,forward函数里需要blocks[0].dsttype,但blocks[0].dsttype返回的是['_N']

    with hg.local_scope():
        hg.ndata['h'] = h_dict
        # formulas (2)-1
        dst_inputs = self.W_self(dst_inputs)
        query = {}
        key = {}
        attn = {}
        attention = {}

        # formulas (3)-1 and (3)-2
        for ntype in hg.dsttypes:
            query[ntype] = self.linear_q[ntype](dst_inputs[ntype])
            key[ntype] = self.linear_k[ntype](dst_inputs[ntype])
lazishu2000 commented 4 months ago

dsttype在数据中通常代表目标节点类型,这看起来像一个数据集本身数据准备不全导致的问题。 如果您还有相同的问题,可以提供使用的数据集,并重新打开本issue。