megengine.functional.nn.nvof¶
- nvof(src, precision=1)[源代码]¶
NVIDIA光流SDK的实现
- 参数
- 返回
(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.- 返回类型
output tensor with shape
import numpy as np from megengine import tensor import megengine.functional as F x = np.random.random_integers(0, 255, (1,2,224,244,4)).astype("uint8") src = tensor(x) result = F.nn.nvof(src, precision=1) print(result.numpy())