-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conv2D computes wrongly in Windows OS #64396
Comments
Hi @Shuo-Sun20 , Thank you! |
This issue only exists on Windows OS, so on Colab(linux OS) this issue will not show up. |
Use following code, I got same result in both linux & windows:
tensorflow 2.16.1
|
|
|
In windows the result is
The pip list in windows:
while in this linux colab, the result is:
I failed to install tensorflow-intel 2.16.1 in colab(linux), so I just installed tensorflow and keras using regular pip command. The pip list is a little different since colab pre installs many packages used in Deep Learning. The list is too long to show in this comment. You can find it yourself with the shared link. |
@Shuo-Sun20 I think it's the different between oneDNN code and Eigen code of TF. But the following code can't work in colab env you provide.
|
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
tf 2.16
Custom code
Yes
OS platform and distribution
Windows 10
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
On Windows OS, Conv2D generates a wrong output in some cases, while performs correctly on some others.
This error does not occur on Linux OS, even with the same code.
An wrong execution example:
![图片](https://private-user-images.githubusercontent.com/97206823/316417847-51fab71a-9bc6-42a9-ab67-19a6c9ec50d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg3OTk5MTYsIm5iZiI6MTcxODc5OTYxNiwicGF0aCI6Ii85NzIwNjgyMy8zMTY0MTc4NDctNTFmYWI3MWEtOWJjNi00MmE5LWFiNjctMTlhNmM5ZWM1MGQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDEyMjAxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1YzcwODBkMWQzM2MxN2E0YjlkY2NmZTkwMjExMDE0ZDcwNDk1MWJkMGVhNTdkOGRlM2Q2YzI3ZDc3NjBlMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.l3fmJe34ewYIetQtMThcYOp3udxrx7mlt2q4APLQ9fw)
You can tell that the result
l(x)
has a wrong shape.I notice that an exisiting issue #63860 points out the similar error in Conv3D. I guess Conv2D and Conv3D have similar problem since they have the same parent class BaseConv.
Standalone code to reproduce the issue
#This test case works fine on linux OS, while goes wrongly on Windows. from keras.layers import Conv2D import numpy as np x=np.random.rand(1,2,2,1) print(l(x).shape) print(l.compute_output_shape(x.shape))
Relevant log output
The text was updated successfully, but these errors were encountered: