MCPcopy Create free account
hub / github.com/alibaba/MNN / printShape

Method printShape

source/core/Tensor.cpp:397–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397void Tensor::printShape() const {
398 const int dims = this->dimensions();
399 MNN_PRINT("\t**Tensor shape**: ");
400 if (dims == 0) {
401 MNN_PRINT("\t*Scalar*");
402 }
403 for (int i = 0; i < dims; ++i) {
404 MNN_PRINT("%d, ", this->length(i));
405 }
406 MNN_PRINT("\n");
407}
408
409size_t Tensor::usize() const {
410 size_t dataSize = mBuffer.type.bytes();

Callers 6

_loadInputFromFileFunction · 0.80
dumpTensorFunction · 0.80
onResizeMethod · 0.80
resizeMethod · 0.80
onComputeSizeMethod · 0.80
onComputeSizeMethod · 0.80

Calls 2

dimensionsMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected