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

Function VerifyShapesCompatible

tensorflow/core/kernels/data/dataset_utils.cc:485–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485Status VerifyShapesCompatible(const std::vector<PartialTensorShape>& expected,
486 const std::vector<PartialTensorShape>& received) {
487 if (expected.size() != received.size()) {
488 return errors::InvalidArgument(
489 "Number of components does not match: expected ", expected.size(),
490 " shapes but got ", received.size(), ".");
491 }
492 for (size_t i = 0; i < expected.size(); ++i) {
493 if (!expected[i].IsCompatibleWith(received[i])) {
494 return errors::InvalidArgument("Incompatible shapes at component ", i,
495 ": expected ", expected[i].DebugString(),
496 " but got ", received[i].DebugString(),
497 ".");
498 }
499 }
500
501 return Status::OK();
502}
503
504uint64 HashSubgraphFunction(const FunctionDefLibrary& library,
505 const FunctionDef* f) {

Callers 15

TEST_PFunction · 0.85
TEST_PFunction · 0.85
TEST_PFunction · 0.85
MakeDatasetMethod · 0.85
TEST_PFunction · 0.85
TEST_PFunction · 0.85
TEST_PFunction · 0.85
TEST_PFunction · 0.85
VerifyResourceMethod · 0.85
TryInitMethod · 0.85
ComputeMethod · 0.85

Calls 4

InvalidArgumentFunction · 0.85
sizeMethod · 0.45
IsCompatibleWithMethod · 0.45
DebugStringMethod · 0.45

Tested by 15

TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68
TEST_PFunction · 0.68