| 168 | |
| 169 | template <typename T1, typename T2> |
| 170 | tensorflow::Status ExpectValue(const T1& v1, const T2& v2, |
| 171 | const string& description) { |
| 172 | if (v1 == v2) return tensorflow::Status::OK(); |
| 173 | return tensorflow::errors::InvalidArgument(absl::StrCat( |
| 174 | "Unexpected ", description, ": got ", v1, ", expected ", v2)); |
| 175 | } |
| 176 | |
| 177 | ArrayDataType ConvertDataType(tensorflow::DataType dtype) { |
| 178 | if (dtype == DT_UINT8) |
no test coverage detected