adm:

The problem is that I do not know what exactly the external tool does.


Than I doubt it’ll be possible to use it inside your forward pass. 
Would it be possible to use an alternative, “open”, approach using a different library, so that you could at least see, which operations are performed?