pytorch报错: Can only calculate the mean of floating types. Got Long instead
小问题不要慌!!!!运行代码:importsyssys.path.append('..')importtorchdefsimple_batch_norm_1d(x,gamma,beta):eps=1e-5x_mean=torch.mean(x,dim=0,keepdim=True)#dim=0在每一列上求取均值保留维度进行broadcastx_var=torch.mean((x-x_mean)**