| 684 | } |
| 685 | |
| 686 | bool Tensor::IsInitialized() const { |
| 687 | return (buf_ != nullptr && buf_->data() != nullptr) || |
| 688 | shape_.num_elements() == 0; |
| 689 | } |
| 690 | |
| 691 | void Tensor::CheckType(DataType expected_dtype) const { |
| 692 | CHECK_EQ(dtype(), expected_dtype) << " " |