Closed
Description
I am trying to add custom gradient support to the Java bindings (tensorflow/java#292). This is currently being prevented by the fact that TF_AddGradientsWithPrefix
requires a lock on the graph, but so do any operation creation methods (i.e. TF_NewOperation
), so it is impossible to create ops in gradient functions.
Is there a way I can get around this? I am considering calling TF_NewOperationLocked
directly but I assume the locks are there for a reason.