MCPcopy Index your code
hub / github.com/apache/tvm / shape

Method shape

jvm/core/src/main/java/org/apache/tvm/Tensor.java:173–181  ·  view source on GitHub ↗

Get shape of current Tensor. @return an array representing shape of current tensor

()

Source from the content-addressed store, hash-verified

171 * @return an array representing shape of current tensor
172 */
173 public long[] shape() {
174 List<Long> data = new ArrayList<Long>();
175 Base.checkCall(Base._LIB.tvmFFIDLTensorGetShape(this.dltensorHandle, data));
176 long[] shapeArr = new long[data.size()];
177 for (int i = 0; i < shapeArr.length; ++i) {
178 shapeArr[i] = data.get(i);
179 }
180 return shapeArr;
181 }
182
183 /**
184 * Get total size of current Tensor.

Callers 2

sizeMethod · 0.95
internalMethod · 0.95

Calls 4

checkCallMethod · 0.95
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected