Does a linear interpolation of two tensors start and end based on a scalar weight and returns the resulting out tensor.
tch_lerp(start, end, weight)
start | the tensor with the starting points. |
---|---|
end | the tensor with the ending points. |
weight | the weight for the interpolation formula. |
out = start - weight * (end - start)
#> tensor #> 5.5000 #> 6.0000 #> 6.5000 #> 7.0000 #> [ Variable[CPUFloatType]{4} ]