Performs the element-wise division of tensor1
by tensor1
, multiply the result by the scalar value
and add it to self. The number of elements must match, but sizes do not matter.
> x = torch.Tensor(2,2):fill(1) > y = torch.Tensor(4) > z = torch.Tensor(2,2):fill(5) > for i=1,4 do y[i] = i end > x:addcdiv(2, y, z) > = x 1.4000 2.2000 1.8000 2.6000 [torch.Tensor of dimension 2x2]