tf2 stops working under gpu mode with 3rd order derivative included in loss function #53410
Labels
comp:gpu
GPU related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.7
Issues related to TF 2.7.0
type:support
Support issues
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
You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
In the case included here, the manually defined loss function includes 3rd order derivative. Attached please find the zip pack that includes the python scripts: NS_tf2.py.
In NS_tf2.py this term is in the form of
where pred represents the output of sequential network and var1 and var2 are tensors.
At the beginning of the python script
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
is used to choose between cpu and gpus.
The above code work well under cpu mode:
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
but get stalled when setting hardware to either 1080ti or 2080ti.
Describe the expected behavior
Code works under gpu mode
Contributing
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/Jupyter/any notebook.
Please find the code in attached pack. Please first cd to scripts' directory to run the scripts.
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.
Please find the code in attached pack. Please first cd to scripts' directory to run the scripts.
tf_bug.zip
The text was updated successfully, but these errors were encountered: