| 2615 | } |
| 2616 | |
| 2617 | void MaybeNotifyVariableAccessed(PyObject* input) { |
| 2618 | DCHECK(CheckResourceVariable(input)); |
| 2619 | DCHECK(PyObject_HasAttrString(input, "_trainable")); |
| 2620 | |
| 2621 | tensorflow::Safe_PyObjectPtr trainable( |
| 2622 | PyObject_GetAttrString(input, "_trainable")); |
| 2623 | if (trainable.get() == Py_False) return; |
| 2624 | TFE_Py_TapeVariableAccessed(input); |
| 2625 | } |
| 2626 | |
| 2627 | bool ReadVariableOp(const FastPathOpExecInfo& parent_op_exec_info, |
| 2628 | PyObject* input, tensorflow::Safe_PyObjectPtr* output, |
no test coverage detected