espnet.utils.spec_augment.interpolate_bilinear
Less than 1 minute
espnet.utils.spec_augment.interpolate_bilinear
espnet.utils.spec_augment.interpolate_bilinear(grid, query_points, name='interpolate_bilinear', indexing='ij')
Similar to Matlab’s interp2 function.
Notes
Finds values for query points on a grid using bilinear interpolation.
- Parameters:
- grid – a 4-D float Tensor of shape [batch, height, width, channels].
- query_points – a 3-D float Tensor of N points with shape [batch, N, 2].
- name – a name for the operation (optional).
- indexing – whether the query points are specified as row and column (ij), or Cartesian coordinates (xy).
- Returns: a 3-D Tensor with shape [batch, N, channels]
- Return type: values
- Raises:
- ValueError – if the indexing mode is invalid, or if the shape of the inputs
- invalid. –