Class TFJ_GradFuncAdapter

All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
AbstractGradientAdapter

@Properties(inherit=tensorflow.class) public class TFJ_GradFuncAdapter extends FunctionPointer
Function to be implemented on the JVM side to be called back by the native library when it is time to attach gradient operations for the given op, graph and scope. grad_inputs are the inputs available to the gradient operations. grad_outputs must received the address of an array of TF_Output allocated by the JVM, which represents the outputs of the gradient operations to attach to the graph. It is important to guarantee that the JVM won't try to trigger the deallocation of that pointer, since the native code will take care of that when it won't need the array anymore. Returns the number of elements pointed by grad_outputs.