TensorFlow 2.0 RC is available Learn more

tfg.math.interpolation.bspline.interpolate

Applies B-spline interpolation to input control points (knots).

tfg.math.interpolation.bspline.interpolate(
    knots,
    positions,
    degree,
    cyclical,
    name=None
)

Defined in math/interpolation/bspline.py.

Note:

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

Args:

  • knots: A tensor with shape [B1, ..., Bk, C] containing knot values, where C is the number of knots.
  • positions: Tensor with shape [A1, .. An]. Positions must be between `[0, C
    • D)for non-cyclical and[0, C)for cyclical splines, whereCis the number of knots andD` is the spline degree.
  • degree: An int between 0 and 4, or an enumerated constant from the Degree class, which is the degree of the splines.
  • cyclical: A bool, whether the splines are cyclical.
  • name: A name for this op. Defaults to "bspline_interpolate".

Returns:

A tensor of shape [A1, ... An, B1, ..., Bk], which is the result of spline interpolation.