tf.ClipByValue() does not work as expected for the parameters (0, 1)
See original GitHub issueTensorFlow.js version: 0.10.0
Google Chrome version: 66.0.3359.181
The tf.ClipByValue()
function fails to clip the values in a tensor when clipValueMin
is set to 0 and clipValueMax
is set to 1.
let tensor = tf.range(0, 10)
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
let t_clip = tensor.clipByValue(0, 1)
t_clip.print()
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
// Spits out the same tensor without clipping the values
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
tf.clip_by_value | TensorFlow v2.11.0
Given a tensor t , this operation returns a tensor of the same type and shape as t with its values clipped to...
Read more >TensorFlow: Network output has not expected shape
I am expecting a (1,1) tensor object as output for my function multilayer_perceptron() , instead, when running pred , it returns a vector...
Read more >Understanding Gradient Clipping (and How It Can Fix ...
Gradient Clipping solves one of the biggest problems that we have while calculating gradients in Backpropagation for a Neural Network.
Read more >Tensorflow.js tf.clipByValue() Function - GeeksforGeeks
clipByValue() function is used to find the clip values of the stated tensor ... tf.clipByValue(x, clipValueMin, clipValueMax). Parameters:.
Read more ><no title> — darts documentation - GitHub Pages
This parameter will be ignored for probabilistic models if the likelihood ... if self.trainer.global_step % 25 == 0: # don't make the tf...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, @nsthorat for pointing the use of old version of tensorflow.js. The issue seems to be solved in
tfjs v0.13.0
for me…Actually, as per my testing, the issue was already solved after the release of tfjs v0.11.7
The code works fine for me for both webgl and cpu. This seems like an environment issue. Could you also add a screenshot of this page which might help?