You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please make sure that this is a bug. As per our GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04, Macos 13.3 (22E252)
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow.js installed from (npm or script link): script link
TensorFlow.js version (use command below): 4.2.0
Browser version: Chrome Version 128.0.6613.86 (Official Build) (arm64)
Tensorflow.js Converter Version:
Describe the current behavior
var x = [[[[321671537.61403847],[-1094522766.8545742],[-325998204.8538573]],[[299797382.9688935],[-537769658.2723553],[2599580.0851950645]]],[[[-974100683.2501612],[-46148750.162222385],[-1288893927.6292384]],[[779491776.4253397],[-890613840.2018843],[1226658906.4400353]]],[[[-1560421053.191113],[2117650474.703003],[202398881.5710206]],[[-534341083.64010644],[1472729719.303554],[1129816296.9227247]]]]
var filter = [[[[512075027.96558523,770768351.9132638]],[[-117044075.04468107,-1309227573.387449]]]]
var stride = [3,1]
var pad = "same"
var dataFormat = "NHWC"
var dilation = 1
var result = tf.conv2d(x, filter,stride,pad,dataFormat,dilation);
console.log("the result of ", tf.getBackend(), "is:\n" );
result.print();
When running the above code snippets on the WASM backend, the result is a tensor with all zero elements.
Output on CPU backend:
Output on WebGL backend:
Output on Wasm backend:
Describe the expected behavior
The output should be consistent across all backends.
Describe the expected behavior
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/CodePen/any notebook.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>bug00</title>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@4.2.0/dist/tf.js"> </script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@4.2.0/dist/tf-backend-wasm.js"></script>
</head>
<body>
<script>
async function conv1d(backend){
await tf.setBackend(backend);
await tf.ready()
var x = [[[[321671537.61403847],[-1094522766.8545742],[-325998204.8538573]],[[299797382.9688935],[-537769658.2723553],[2599580.0851950645]]],[[[-974100683.2501612],[-46148750.162222385],[-1288893927.6292384]],[[779491776.4253397],[-890613840.2018843],[1226658906.4400353]]],[[[-1560421053.191113],[2117650474.703003],[202398881.5710206]],[[-534341083.64010644],[1472729719.303554],[1129816296.9227247]]]]
var filter = [[[[512075027.96558523,770768351.9132638]],[[-117044075.04468107,-1309227573.387449]]]]
var stride = [3,1]
var pad = "same"
var dataFormat = "NHWC"
var dilation = 1
var result = await tf.conv2d(x, filter,stride,pad,dataFormat,dilation);
await console.log("the result of ", tf.getBackend(), "is:\n" );
await result.print();
}
async function test() {
await conv1d("cpu");
await conv1d("webgl");
await conv1d("wasm");
}
test();
</script>
</body>
</html>
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered:
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Describe the current behavior
When running the above code snippets on the WASM backend, the result is a tensor with all zero elements.
Output on CPU backend:
Output on WebGL backend:
Output on Wasm backend:
Describe the expected behavior
The output should be consistent across all backends.
Describe the expected behavior
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/CodePen/any notebook.
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: