I implemented this function for pytorch.matmul for complex numbers using torch.mv and it's working fine for time-being:
def matmul_complex(t1, t2): m = list(t1.size())[0] n = list(t2.size())[1] t = torch.empty((1,n), dtype=torch.cfloat) t_total = torch.empty((m,n), dtype=torch.cfloat) for i in range(0,n): if i == 0: t_total = torch.mv(t1,t2[:,i]) else: t_total = torch.cat((t_total, torch.mv(t1,t2[:,i])), 0) t_final = torch.reshape(t_total, (m,n)) return t_final
I am new to PyTorch, so please correct me if I am wrong.