How Gradient passed by tf.py_func
问题 This is Faster R-CNN implement in tensorflow. The proposal_layer is implement by python i am curious about if gradient can pass by tf.py_func the weights and biases are keep changing so I think the gradient deliver back successful Then I do a small test import tensorflow as tf import numpy as np def addone(x): # print type(x) return x + 1 def pyfunc_test(): # create data x_data = tf.placeholder(dtype=tf.float32, shape=[None]) y_data = tf.placeholder(dtype=tf.float32, shape=[None]) w = tf