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

Method dims

tensorflow/lite/toco/model.h:347–354  ·  view source on GitHub ↗

We still have that one convenience accessor to avoid the awkward double bracket issue: shape.dims()[i].

Source from the content-addressed store, hash-verified

345 // We still have that one convenience accessor to avoid
346 // the awkward double bracket issue: shape.dims()[i].
347 int dims(int i) const {
348 // Always check for out-of-bounds accesses, even in optimized builds where
349 // standard assertions are disabled. Out-of-bounds access here is a common
350 // occurrence.
351 CHECK_GE(i, 0);
352 CHECK_GT(dims_.size(), i);
353 return dims_[i];
354 }
355
356 bool operator==(const Shape& comp) const {
357 return (this->dims_ == comp.dims());

Callers 15

BatchOneInputFunction · 0.45
SplitOneOutputFunction · 0.45
Tensor2ResponseFunction · 0.45
SparsifyWeightsFunction · 0.45
ErrorIfNotVectorFunction · 0.45
PrintBenchmarkUsageFunction · 0.45
FoldBatchNormsFunction · 0.45
CopyShapeAndTypeFunction · 0.45
GetTensorShapeFunction · 0.45
GetArrayLabelFunction · 0.45
LogArrayFunction · 0.45
UnextendShapeFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by 5

GetTensorShapeFunction · 0.36
TEST_PFunction · 0.36
TESTFunction · 0.36
RunResolveSumFunction · 0.36
TEST_FFunction · 0.36