API description: Given an input tensor input and a grid, computes the output using input values and pixel locations from grid.
Formulas:
The dimensions of input, grid, and output are as follows:
input, grid, and out have the same N. input and output have the same C. , , and in grid and output are the same. The size of the last dimension of grid is 3. The input pixel location is (x, y, z). The value ranges of x, y, and z are normalized to [-1, 1].
- Out-of-bound coordinates are processed based on the padding mode.
- paddingMode=0: Use 0 for out-of-bound locations.
- paddingMode=1: Use border values for out-of-bound locations.
- paddingMode=2: Use symmetric values of the border values for out-of-bound locations.
- During input sampling, the processing varies according to interpolationMode.
- interpolationMode="bilinear": Use the weighted average value of the 8 coordinates around (x, y, z) in the input.
- interpolationMode="nearest": Use the nearest coordinates to (x, y, z) in the input.
- Out-of-bound coordinates are processed based on the padding mode.
Each operator has calls. First, aclnnGridSampler3DGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnGridSampler3D is called to perform computation.
Parameters
[object Object][object Object]Atlas training products[object Object]:
The data types of input, grid, and out do not support BFLOAT16.
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
- The value of $ (D size x H size x W size) of the input must be less than the maximum value of INT32.
- Deterministic computation:
- aclnnGridSampler3D defaults to a deterministic implementation.
The following example is for reference only. For details, see .