* Helper method to write multiple tensors to the specified indices.
(indices: number[], tensors: Tensor[])
| 162 | * Helper method to write multiple tensors to the specified indices. |
| 163 | */ |
| 164 | writeMany(indices: number[], tensors: Tensor[]) { |
| 165 | if (indices.length !== tensors.length) { |
| 166 | throw new Error( |
| 167 | `TensorArray ${this.name}: could not write multiple tensors,` + |
| 168 | `because the index size: ${ |
| 169 | indices.length} is not the same as tensors size: ${ |
| 170 | tensors.length}.`); |
| 171 | } |
| 172 | |
| 173 | indices.forEach((i, index) => this.write(i, tensors[index])); |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Return selected values in the TensorArray as a packed Tensor. All of |
no test coverage detected