-
Notifications
You must be signed in to change notification settings - Fork 40
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
Model nondeterminism when using K.layers.DepthwiseConv2D
/ tf.nn.depthwise_conv2d
(known issue)
#26
Comments
I put my code below.
|
Hi Youngsam, First of all, please will you come to the issue on the GitHub web app and edit your comments. By responding to the emails from GitHub, you've added a lot of junk into the comment thread. There are two comments that are about 50 or more lines long, but only need to be one or two lines long. It's better to respond in the issue, through the web interface. Secondly, thanks for the code. I've looked through it and there is nothing that stands out immediately as being an issue. I'm going to need to instrument this and isolate the source of nondeterminism. I'll get back to you. |
Actually, |
I didn't noticed that my email response is automatically attached here. I'll respond through this webpage. Thanks. |
OK. I deleted my comment written by email. |
Thanks. I've also tidied up as much as I could by removing my responses to your email-sourced comments. |
I am having trouble with this too! I got non-deterministic results on lots of experiments with Tensorflow2.3-GPU. Have you solved the problem? Listed below are my statement:
|
@hermosayhl: you're using |
Not yet. Listed below are codes for network copied from ResNet_TF2
|
@hermosayhl, please open a new issue and remove your comments from this issue. |
I changed the title of this issue and I'm going to close it. @kimzt's model contains an op that does not yet have a deterministic GPU implementation. Recommend using another op or finding another work-around until we implement a GPU-deterministic version of this op. |
K.layers.DepthwiseConv2D
/ tf.nn.depthwise_conv2d
(known issue)
closing |
@kimzt, please will you try running the patch I mention here on TensorFlow Issue 47174. This will move the depthwise-conv2d functionality onto the CPU and should result in your model training deterministically, though a little more slowly. |
Thank you for your information. I updated my code applied the patch you suggested. Unfortunately, in my code, I got still non-deterministic results. More specifically, training loss looks deterministic, but training variables doesn't. Following log is for comparison with training variables after two runs on GPU. ===== Summary of trainig variables per layer ===== I hope this would help you making patch for deterministic DepthwiseConv2D. |
Thanks @kimzt. Either the patch is not working for some reason or there is another source of nondeterminism. I have a task to debug the model; I can't promise when I'll get to that. |
I'm also going to reopen this issue ... |
See this study for more information about nondeterminism and depthwise convolution. |
Update: MR 51920 adds determinism-unimplemented exception-throwing to |
Dear @duncanriach,
I'm using TF2.3 on Ubuntu 16.04.
To get deterministic results, I followed your instructions. Please check the attached code that is very simple MNIST example.
After running the code twice, I compared the results. Unfortunately, I got some non-deterministic results such as loss, embs, and so on.
Please check my code and give me some advice.
The text was updated successfully, but these errors were encountered: