no input if tensor == nullptr.
| 1661 | |
| 1662 | // no input if tensor == nullptr. |
| 1663 | inline bool OpKernelContext::has_input(int index) const { |
| 1664 | DCHECK_GE(index, 0); |
| 1665 | DCHECK_LT(index, num_inputs()); |
| 1666 | return (*params_->inputs)[index].tensor != nullptr; |
| 1667 | } |
| 1668 | |
| 1669 | inline Tensor* OpKernelContext::input_ref(int index) { |
| 1670 | DCHECK_GE(index, 0); |