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

Function ValidateShape

serving/processor/serving/model_message.cc:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace processor {
7namespace {
8Status ValidateShape(const std::vector<Request>& requests) {
9 for (int i = 0; i < requests[0].inputs.size(); ++i) {
10 auto shape = requests[0].inputs[i].second.shape();
11 for(auto it : requests) {
12 if (shape != it.inputs[i].second.shape()) {
13 return Status(error::Code::INVALID_ARGUMENT,
14 "Invalid input shapes when batched process.");
15 }
16 }
17 }
18 return Status::OK();
19}
20
21template<typename T>
22Tensor BatchOneInput(const std::vector<Request>& requests, int index) {

Callers 15

BatchRequestMethod · 0.85
PopulateShapeMethod · 0.85
AppendMajorDimensionMethod · 0.85
ByteSizeOfMethod · 0.85
ByteSizeOfElementsMethod · 0.85
ResetLayoutMethod · 0.85
CreateFromProtoMethod · 0.85
CheckLayoutsMethod · 0.85
CheckParametersFunction · 0.85

Calls 3

StatusClass · 0.50
sizeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected