PyTorch手动初始化卷积层并进行卷积运算报数据类型错误Expected object of scalar type Double but got scalar type Float for arg
ExpectedobjectofscalartypeDoublebutgotscalartypeFloatforargument#4‘bias’尝试脱离nn.Module模块手动定义conv2d层,并对权重init和卷积运算X=torch.arange(1,17,dtype=float).reshape((1,1,4,4))K=torch.arange(1,10,dtype=float).resh