MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ExpectEqual

Method ExpectEqual

tensorflow/core/kernels/data/dataset_test_base.cc:138–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138Status DatasetOpsTestBase::ExpectEqual(const Tensor& a, const Tensor& b) {
139 switch (a.dtype()) {
140#define CASE(DT) \
141 case DataTypeToEnum<DT>::value: \
142 TF_RETURN_IF_ERROR(IsEqual<DT>(a, b)); \
143 break;
144 TF_CALL_NUMBER_TYPES(CASE);
145 TF_CALL_tstring(CASE);
146 TF_CALL_uint32(CASE);
147 TF_CALL_uint64(CASE);
148 // TODO(feihugis): figure out how to support variant tensors.
149#undef CASE
150 default:
151 return errors::Internal("Unsupported dtype: ", a.dtype());
152 }
153 return Status::OK();
154}
155
156template <typename T>
157bool compare(const Tensor& t1, const Tensor& t2) {

Callers

nothing calls this directly

Calls 6

InternalFunction · 0.85
StatusClass · 0.50
ExpectEqualFunction · 0.50
dtypeMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected