megengine.functional.nn.nvof¶
- nvof(src, precision=1)[源代码]¶
NVIDIA 光流 SDK 的实现
- 参数
- 返回
shape 为
(n, t-1, (h+out_grid_size-1)//out_grid_size, (w+out_grid_size-1)//out_grid_size, c2)
(out_grad_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())