-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
type:bugSomething isn't workingSomething isn't working
Description
To get help from the community, check out our Google group.
TensorFlow.js version
Latest (0.14.1)
Browser version
Latest Firefox + Chrome
Describe the problem or feature request
Clone() doesn't actually clone.
Code to reproduce the bug / link to feature request
You can run the following code on the tfjs API console (https://js.tensorflow.org/api/0.14.1/#clone)
const x = tf.tensor([3, 2, 1]);
x.clone().data().then(response => {
const sorted = response.sort();
console.log(sorted); // gets called second
console.log(x.dataSync()); // gets called last
});
console.log(x.dataSync()); // gets called firstOr seen synchronous:
const x = tf.tensor([3, 2, 1]);
console.log(x.dataSync()); //gets called first
const data = tf.clone(x).dataSync();
const sorted = data.sort();
console.log(sorted); // gets called second
console.log(x.dataSync()); // gets called lastOutput:
3,2,1
1,2,3
1,2,3
Expected output:
3,2,1
1,2,3
3,2,1
Metadata
Metadata
Assignees
Labels
type:bugSomething isn't workingSomething isn't working