Get total size of current Tensor. @return size of current Tensor.
()
| 185 | * @return size of current Tensor. |
| 186 | */ |
| 187 | public long size() { |
| 188 | long product = 1L; |
| 189 | long[] shapeArr = shape(); |
| 190 | for (int i = 0; i < shapeArr.length; ++i) { |
| 191 | product *= shapeArr[i]; |
| 192 | } |
| 193 | return product; |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Return a copied flat java array of current array (row-major). |
no test coverage detected