(
shape: number[], dtype: DataType,
values?: BackendValues|string[])
| 702 | } |
| 703 | |
| 704 | makeTensorInfo( |
| 705 | shape: number[], dtype: DataType, |
| 706 | values?: BackendValues|string[]): TensorInfo { |
| 707 | if (dtype === 'string' && values != null && values.length > 0 && |
| 708 | util.isString(values[0])) { |
| 709 | values = (values as unknown as string[]).map(d => util.encodeString(d)); |
| 710 | } |
| 711 | const dataId = this.write(values as BackendValues, shape, dtype); |
| 712 | return {dataId, shape, dtype}; |
| 713 | } |
| 714 | |
| 715 | private tensorToBinding(tensor?: TensorInfo): GPUBindingResource { |
| 716 | if (!tensor) { |
no test coverage detected