tfg.math.interpolation.slerp.interpolate
Stay organized with collections
Save and categorize content based on your preferences.
Applies slerp to vectors or quaternions.
tfg.math.interpolation.slerp.interpolate(
vector1: type_alias.TensorLike,
vector2: type_alias.TensorLike,
percent: type_alias.Float,
method: tfg.math.interpolation.slerp.InterpolationType
= tfg.math.interpolation.slerp.InterpolationType.QUATERNION
,
eps: Optional[type_alias.Float] = None,
name: Optional[str] = None
) -> tf.Tensor
Args |
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.
|
percent
|
A float or a tensor with shape broadcastable to the shape of
input vectors.
|
method
|
An enumerated constant from the class InterpolationType, which is
either InterpolationType.QUATERNION (default) if the input vectors are 4-D
quaternions, or InterpolationType.VECTOR if they are regular M-D vectors.
|
eps
|
A small float for operation safety. If left None, its value is
automatically selected using dtype of input vectors.
|
name
|
A name for this op. Defaults to "vector_weights" or
"quaternion_weights" depending on the method.
|
Returns |
A tensor of shape [A1, ... , An, M]` which stores the result of the
interpolation.
|
Raises |
ValueError
|
if method is not amongst enumerated constants defined in
InterpolationType.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-28 UTC."],[],[]]