Solved by redamit in post #3 
              
              
                Hi KFrank, Thanks for your response. 
Most probably I will implement or use some face-detector in PyTorch, cause any other method may not be implemented properly. 
If that doesn’t work is there any other way where I can use the gradients calculated before the face-detector and implement those in the…