11133
September 20, 2021, 2:26am
#1
I’m trying to port Deformable Conv V2 to tensorflow and got a trouble: there is no any docs about how to estimate a usual matmul of 2 tensors inside c++.
Can someone help with example?
P.S.
There is a lot of computations for that matmul, so i expect that is should be something like a CPU/GPU functor template.
Bhack
September 20, 2021, 9:20am
#3
Take a look at:
tensorflow:master
← Licht-T:add-deformable-conv
opened 02:10AM - 08 Oct 20 UTC
# Description
This is the implementation of [Modulated Deformable Convolution… ](https://arxiv.org/abs/1811.11168). This fixes #179. There is another PR #1129, but that is stale and contaminated by [unknown license codes](https://github.com/tensorflow/addons/pull/1129#issuecomment-662063946). So I re-implemented this which is based on [the Torchvision's implementation](https://github.com/pytorch/vision/pull/1586).
~~I knew this would be too big to get reviewed, so, at first, I made the CPU only kernel with Eigen. When the CPU kernel is good enough, I will move to the next step: the GPU kernel implementation.~~
**UPDATE: GPU kernel available!**
## Type of change
- [ ] Bug fix
- [ ] New Tutorial
- [ ] Updated or additional documentation
- [ ] Additional Testing
- [ ] New Activation and the changes conform to the [activation contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/activations/README.md#contribution-guidelines)
- [ ] New Callback and the changes conform to the [callback contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/callbacks/README.md#contribution-guidelines)
- [ ] New Image addition and the changes conform to the [image op contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/image/README.md#contribution-guidelines)
- [x] New Layer and the changes conform to the [layer contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/layers/README.md#contribution-guidelines)
- [ ] New Loss and the changes conform to the [loss contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/losses/README.md#contribution-guidelines)
- [ ] New Metric and the changes conform to the [metric contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/metrics/README.md#contribution-guidelines)
- [ ] New Optimizer and the changes conform to the [optimizer contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/optimizers/README.md#contribution-guidelines)
- [ ] New RNN Cell and the changes conform to the [rnn contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/rnn/README.md#contribution-guidelines)
- [ ] New Seq2seq addition and the changes conform to the [seq2seq contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/seq2seq/README.md#contribution-guidelines)
- [ ] New Text addition and the changes conform to the [text op contribution guidelines](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/text/README.md#contribution-guidelines)
# Checklist:
- [x] I've properly [formatted my code according to the guidelines](https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md#coding-style)
- [ ] By running Black + Flake8
- [x] By running pre-commit hooks
- [x] This PR addresses an already submitted issue for TensorFlow Addons
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] This PR contains modifications to C++ custom-ops
# How Has This Been Tested?
`pytest` unit-testing
More in general If you are interested in custom ops:
https://tensorflow-prod.ospodiscourse.com/t/deformable-convolution-and-other-custom-ops/1951?u=bhack