Use new Operation._set_attr method instead of modifying node_def directly.
Once calling the C API from TF's Python code is enabled, the NodeDef returned by Operation.node_def will no longer be the NodeDef sent to TF's runtime, meaning any changes to it will have no effect. Use _set_attr instead, which works with and without the C API enabled. PiperOrigin-RevId: 183759464
Loading
Please sign in to comment