https://cloud.tencent.com/developer/article/1004985 https://cloud.tencent.com/developer/article/1149993 https://zhuanlan.zhihu.com/p/27783097 https://github.com/pytorch/pytorch/issues/4714 https://pytorch.org/docs/stable/notes/extending.html