* Flattens input by reshaping it into a one-dimensional tensor. * If `start_dim` or `end_dim` are passed, only dimensions starting with `start_dim` * and ending with `end_dim` are flattened. The order of elements in input is unchanged. * @param {number} start_dim the first dim to flat
(start_dim = 0, end_dim = -1)
| 659 | * @returns {Tensor} The flattened tensor. |
| 660 | */ |
| 661 | flatten(start_dim = 0, end_dim = -1) { |
| 662 | return this.clone().flatten_(start_dim, end_dim); |
| 663 | } |
| 664 | |
| 665 | /** |
| 666 | * Returns a new tensor with the same data as the `self` tensor but of a different `shape`. |
no test coverage detected