稀疏图注意代码中的ctx.N = shape[0]是什么意思啊?


class SpecialSpmmFunction(torch.autograd.Function):
    """Special function for only sparse region backpropataion layer."""
    @staticmethod
    def forward(ctx, indices, values, shape, b):
        assert indices.requires_grad == False
        a = torch.sparse_coo_tensor(indices, values, shape)
        ctx.save_for_backward(a, b)
# # # # 
       ctx.N = shape[0]
# # # # 
        return torch.matmul(a, b)