megengine.functional.nn.nvof#

nvof(src, precision=1)[source]#

Implements NVIDIA Optical Flow SDK.

Parameters:
  • src (Tensor) – input tensor with shape (n, t, h, w, c4) and unit8 dtype.

  • precision (int) – 0:NV_OF_PERF_LEVEL_SLOW 1:NV_OF_PERF_LEVEL_MEDIUM 2:NV_OF_PERF_LEVEL_FAST.

Returns:

(n, t-1, (h+out_grid_size-1)//out_grid_size, (w+out_grid_size-1)//out_grid_size, c2). By default, out_grid_size = 4. dtype: int16.

Return type:

output tensor with shape