| 395 | } |
| 396 | |
| 397 | void 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 | |
| 409 | size_t Tensor::usize() const { |
| 410 | size_t dataSize = mBuffer.type.bytes(); |
no test coverage detected