This is my model definition where i am just taking the textual features with 100 latent dimensions
class MMGCN(torch.nn.Module):
    def __init__(self, features, edge_index, batch_size, num_user, num_item, aggr_mode, concate, num_layer, has_id,
                 dim_x):
        super(MMGCN, self).__init__()
        self.batch_size = batch_size
        self.num_user = num_user
        self.num_item = num_item
        self.aggr_mode = aggr_mode
        self.concate = concate

        self.edge_index = torch.tensor(edge_index).t().contiguous().cuda()
        self.edge_index = [torch.cat](http://torch.cat)((self.edge_index, self.edge_index[[1, 0]]), dim=1)

        t_feat = features
        self.t_feat = torch.tensor(t_feat, dtype=torch.float).cuda()
        self.t_gcn = GCN(self.t_feat, self.edge_index, batch_size, num_user, num_item, dim_x, self.aggr_mode,
                         self.concate, num_layer=num_layer, has_id=has_id, dim_latent=100)

        self.id_embedding = nn.init.xavier_normal_(torch.rand((num_user + num_item, dim_x), requires_grad=True)).cuda()
        self.result_embed = nn.init.xavier_normal_(torch.rand((num_user + num_item, dim_x))).cuda()

    def forward(self, user_nodes, pos_item_nodes, neg_item_nodes):
        t_rep = self.t_gcn(self.id_embedding)
        representation = (t_rep) / 1

and when i training this it is giving the error weight mismatch

in training am taking the 2 layers with batch size 128 against 55585 users and 5986 items. error is

5986*


Capture.PNG1262×79 3.33 KB