'opengl uses pytorch's tensor as input

I am using pytorch and opengl, I want to use tensor as the input of opengl (such as viewport is a tensor), the require_grad=true of these tensor, the image type I want to get through opengl is also tensor, so as to further deep learning. I would like to ask if it is possible to use opengl to complete the above tasks, and if so, how should I do it. I hope there are masters in this area who can answer ,best wishes!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source