tfg.math.interpolation.weighted.interpolate
Weighted interpolation for M-D point sets.
tfg.math.interpolation.weighted.interpolate(
points: type_alias.TensorLike,
weights: type_alias.TensorLike,
indices: type_alias.TensorLike,
normalize: bool = True,
allow_negative_weights: bool = False,
name: str = 'weighted_interpolate'
) -> type_alias.TensorLike
Given an M-D point set, this function can be used to generate a new point set
that is formed by interpolating a subset of points in the set.
Note |
In the following, A1 to An, and B1 to Bk are optional batch dimensions.
|
Args |
points
|
A tensor with shape [B1, ..., Bk, M] and rank R > 1, where M is
the dimensionality of the points.
|
weights
|
A tensor with shape [A1, ..., An, P] , where P is the number of
points to interpolate for each output point.
|
indices
|
A tensor of dtype tf.int32 and shape [A1, ..., An, P, R-1] , which
contains the point indices to be used for each output point. The R-1
dimensional axis gives the slice index of a single point in points . The
first n+1 dimensions of weights and indices must match, or be broadcast
compatible.
|
normalize
|
A bool describing whether or not to normalize the weights on
the last axis.
|
allow_negative_weights
|
A bool describing whether or not negative weights
are allowed.
|
name
|
A name for this op. Defaults to "weighted_interpolate".
|
Returns |
A tensor of shape [A1, ..., An, M] storing the interpolated M-D
points. The first n dimensions will be the same as weights and indices.
|
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.
[null,null,["Last updated 2022-10-28 UTC."],[],[]]