I converted it to a np.float32.
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import scipy.sparse as sp

n_samples = 100
n_features = 20
A_ = sp.random(n_samples, n_samples, dtype=np.float32)
X_ = np.random.random([n_samples, n_features]).astype(np.float32)
#↑here

def to_torch_sparse_tensor(M):
    M = M.tocoo().astype(np.float32)
    indices = torch.from_numpy(np.vstack((M.row, M.col))).long()
    values = torch.from_numpy(M.data)
    shape = torch.Size(M.shape)
    T = torch.sparse.FloatTensor(indices, values, shape)
    return T

X = torch.from_numpy(X_)
A = to_torch_sparse_tensor(A_)

class GraphConv(nn.Module):
    def __init__(self, size_in, size_out):
        super(GraphConv, self).__init__()
        self.W = nn.parameter.Parameter(torch.Tensor(size_in, size_out))
        self.b = nn.parameter.Parameter(torch.Tensor(size_out))
        # Initialize weights
        variance = 2 / (size_in + size_out)
        self.W.data.normal_(0.0, variance)
        self.b.data.normal_(0.0, variance)
    
    def forward(self, X, A):
        return torch.mm(torch.mm(A, X), self.W) + self.b

gcn = GraphConv(X.size()[1], 128)
gcn(X, A)

tensor([[ 2.5033e-02,  3.0702e-02, -4.3435e-02,  …,  3.1698e-02,
-1.2819e-02,  4.3160e-02],
[ 1.3049e-02, -3.4871e-03, -2.6543e-02,  …,  8.5519e-03,
7.0735e-03,  1.4211e-02],
[ 5.3494e-02,  3.7187e-02, -5.0533e-02,  …,  2.2295e-02,
-1.8713e-02,  4.8472e-02],
…,
[ 2.3762e-02,  7.9290e-02, -6.0602e-02,  …,  6.9588e-02,
-9.7072e-02,  1.3955e-01],
[ 3.3650e-02,  3.1555e-02, -2.4376e-02,  …,  2.0983e-02,
2.0457e-03,  5.1157e-02],
[ 1.4304e-02, -1.9657e-02, -1.5910e-02,  …,  3.1639e-03,
9.0677e-03,  8.1202e-03]])