Closed duongpaKikai closed 4 years ago
Maybe this CPU implementation of correlation (https://github.com/ClementPinard/Pytorch-Correlation-extension) can serve your purpose?
@yzcjtr thank for your help but i need implementation under form like operator of tensor pytorch because i want convert to Script model (Script model not support cupy)
I believe the implementation I referenced above doesn't use cupy. It should support CPU execution as well. Anyway, there's no off-the-shelf correlation operator in official PyTorch till now I believe. Though you can find one in tensorflow addons (https://www.tensorflow.org/addons/api_docs/python/tfa/layers/CorrelationCost).
@yzcjtr its so helpfull Thank for your help
We have run hd3 with us video and result very good We want to convert hd3 => TorchScript to add us program run in C++ demo for boss But when script model we get error with
re.search('(SIZE_)([0-4])(\()([^\)]*)(\))', strKernel)
in cupy of _FunctionCorrelationSo whether have way replace calculate Correlation with cupy. just use operator between tensor with tensor on cpu
many thank