tfg.math.interpolation.slerp.interpolate_with_weights

View source on GitHub

Interpolates vectors by taking their weighted sum.

Interpolation for all variants of slerp is a simple weighted sum over inputs. Therefore this function simply returns weight1 * vector1 + weight2 * vector2.

Note:

In the following, A1 to An are optional batch dimensions.

vector1 A tensor of shape [A1, ... , An, M], which stores a normalized vector in its last dimension.
vector2 A tensor of shape [A1, ... , An, M], which stores a normalized vector in its last dimension.
weight1 A float or a tensor describing weights for the vector1 and with a shape broadcastable to the shape of the input vectors.
weight2 A float or a tensor describing weights for the vector2 and with a shape broadcastable to the shape of the input vectors.
name A name for this op. Defaults to "interpolate_with_weights".

A tensor of shape [A1, ... , An, M] containing the result of the interpolation.