Y.unsqueeze(0) has a shape (1, C, D) so that it can not be expanded as X which has a shape (A, B, C).
What i want to do is to broadcast 2D matrix multiplication as below.
def matmul(X, Y):
    results = [] 
    for i in range(X.size(0)):
        result = torch.mm(X[i], Y)
        results.append(result)
    return torch.cat(results)