megengine.functional.nn.correlation¶
- correlation(data1, data2, kernel_size=1, max_displacement=1, stride1=1, stride2=1, pad_size=0, is_multiply=True)[源代码]¶
Applies correlation to inputs.
- 参数
data1 (
Tensor
) – Input data1 to the correlation. format must be nchwdata2 (
Tensor
) – Input data2 to the correlation. format must be nchwkernel_size (
int
) – int (non-negative), optional, default=1) – kernel size for Correlation must be an odd numbermax_displacement (
int
) – int (non-negative), optional, default=1) – Max displacement of Correlationstride1 (
int
) – int (non-negative), optional, default=1) – stride1 quantize data1 globallystride2 (
int
) – int (non-negative), optional, default=1) – stride2 quantize data2 within the neighborhood centered around data1pad_size (
int
) – int (non-negative), optional, default=0) – pad for Correlationis_multiply (
bool
) – boolean, optional, default=True) – operation type is either multiplication or absolute difference
- 返回类型