Skip to content

Commit

Permalink
[node] Use makeTensorFromTensorInfo instead of makeTensorFromId (#6361)
Browse files Browse the repository at this point in the history
* [node] Use makeTensorFromTensorInfo instead of makeTensorFromId
See #6355

* [node] Disable upperBound and lowerBound tests

Co-authored-by: Na Li <linazhao@google.com>
  • Loading branch information
mattsoulanille and lina128 authored May 3, 2022
1 parent 90b4288 commit ba3a4cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tfjs-node/src/nodejs_kernel_backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export class NodeJSKernelBackend extends KernelBackend {
// We can then change the return type from Tensor to TensorInfo.
// return {dataId: newId, shape: metadata.shape, dtype};

return tf.engine().makeTensorFromDataId(newId, metadata.shape, dtype);
const tensorInfo: TensorInfo = {
dataId: newId, shape: metadata.shape, dtype};
return tf.engine().makeTensorFromTensorInfo(tensorInfo);
}

// Prepares Tensor instances for Op execution.
Expand Down
3 changes: 3 additions & 0 deletions tfjs-node/src/run_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ const IGNORE_LIST: string[] = [
// int32 input for the following ops not supported by TF 2.4.0.
'leakyrelu test-tensorflow {} int32',
'step kernel test-tensorflow {} with int32 tensor',
// upperBound and lowerBound use SearchSorted, which is unsupported
'upperBound',
'lowerBound',
];

if (process.platform === 'win32') {
Expand Down

0 comments on commit ba3a4cb

Please sign in to comment.