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

Method ValidateTupleCommon

tensorflow/core/kernels/queue_base.cc:63–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61QueueBase::~QueueBase() {}
62
63Status QueueBase::ValidateTupleCommon(const Tuple& tuple) const {
64 if (tuple.size() != static_cast<size_t>(num_components())) {
65 return errors::InvalidArgument(
66 "Wrong number of components in tuple. Expected ", num_components(),
67 ", got ", tuple.size());
68 }
69 for (size_t i = 0; i < tuple.size(); ++i) {
70 if (tuple[i].dtype() != component_dtypes_[i]) {
71 return errors::InvalidArgument(
72 "Type mismatch in tuple component ", i, ". Expected ",
73 DataTypeString(component_dtypes_[i]), ", got ",
74 DataTypeString(tuple[i].dtype()));
75 }
76 }
77 return Status::OK();
78}
79
80// static
81string QueueBase::ShapeListString(const gtl::ArraySlice<TensorShape>& shapes) {

Callers

nothing calls this directly

Calls 5

num_componentsFunction · 0.85
InvalidArgumentFunction · 0.85
DataTypeStringFunction · 0.50
sizeMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected