(
values: backend_util.BackendValues, shape: number[],
dtype: DataType)
| 50 | } |
| 51 | |
| 52 | override write( |
| 53 | values: backend_util.BackendValues, shape: number[], |
| 54 | dtype: DataType): DataId { |
| 55 | if (this.firstUse) { |
| 56 | this.firstUse = false; |
| 57 | if (env().get('IS_NODE')) { |
| 58 | backend_util.warn( |
| 59 | '\n============================\n' + |
| 60 | 'Hi, looks like you are running TensorFlow.js in ' + |
| 61 | 'Node.js. To speed things up dramatically, install our node ' + |
| 62 | 'backend, visit https://github.com/tensorflow/tfjs-node for more details. ' + |
| 63 | '\n============================'); |
| 64 | } |
| 65 | } |
| 66 | const dataId = {id: this.nextDataId()}; |
| 67 | |
| 68 | this.data.set(dataId, {values, dtype, refCount: 1}); |
| 69 | |
| 70 | return dataId; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Create a data bucket in cpu backend. |
no test coverage detected