* Internal method used by backends. Makes a new tensor that is a wrapper * around an existing data id in TensorInfo. It doesn't create a new data id, * only increments the ref count used in memory tracking.
(tensorInfo: TensorInfo, backend?: KernelBackend)
| 846 | * only increments the ref count used in memory tracking. |
| 847 | */ |
| 848 | makeTensorFromTensorInfo(tensorInfo: TensorInfo, backend?: KernelBackend): |
| 849 | Tensor { |
| 850 | const {dataId, shape, dtype} = tensorInfo; |
| 851 | const t = new Tensor(shape, dtype, dataId, this.nextTensorId()); |
| 852 | this.trackTensor(t, backend); |
| 853 | return t; |
| 854 | } |
| 855 | |
| 856 | makeVariable( |
| 857 | initialValue: Tensor, trainable = true, name?: string, |
no test coverage detected