0
我想註冊一個python函數及其梯度作爲tensorflow操作。 我發現了許多有用的例子,例如:在屬性python中定義tensorflow操作
Write Custom Python-Based Gradient Function for an Operation? (without C++ Implementation)
https://programtalk.com/python-examples/tensorflow.python.framework.function.Defun/
儘管如此我希望登記在操作屬性,並通過調用op.get_attr使用漸變定義這些屬性(「attr_name」) 。
這是可能的,而不會下降到C實施? 願你舉個例子嗎?
嗨皮特和謝謝!請給我一個例子嗎? –