| 67 | |
| 68 | private: |
| 69 | void DoUpdate(OpKernelContext* context) { |
| 70 | Tensor Tparams = context->mutable_input(0, use_exclusive_lock_); |
| 71 | const Tensor& Tupdate = context->input(1); |
| 72 | OP_REQUIRES(context, Tparams.IsInitialized(), |
| 73 | errors::FailedPrecondition("Attempting to use uninitialized " |
| 74 | "parameters: ", |
| 75 | requested_input(0))); |
| 76 | OP_REQUIRES( |
| 77 | context, Tparams.IsSameSize(Tupdate), |
| 78 | errors::InvalidArgument("Parameters and update must be the same size")); |
| 79 | |
| 80 | functor::DenseUpdate<Device, T, OP> update_functor; |
| 81 | update_functor(context->template eigen_device<Device>(), Tparams.flat<T>(), |
| 82 | Tupdate.flat<T>()); |
| 83 | } |
| 84 | |
| 85 | bool use_exclusive_lock_; |
| 86 | }; |
nothing calls this directly
no test coverage detected