You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@mxnet.apache.org by Tomasz Derek via MXNet Forum <mx...@discoursemail.com.INVALID> on 2020/08/31 14:40:29 UTC

[MXNet Forum] Two models in file MXNET and Tensorflow


Hi, I have a problem. In my project, I have a file which uses TensorFlow and MXNet models. Everything is fine when I use GPU only by TensorFlow when I switch MXNet to GPU I'm getting an error:
E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR





---
[Visit Topic](https://discuss.mxnet.io/t/two-models-in-file-mxnet-and-tensorflow/6555/1) or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.mxnet.io/email/unsubscribe/a07cc1b3a4b7812dcaff15fdfb1f005be9402b361918e2e931a7a98d113a2d23).

[MXNet Forum] [Gluon] Two models in file MXNET and Tensorflow

Posted by Emil Pi via MXNet Forum <mx...@discoursemail.com.INVALID>.

This is memory error.
If I understand right, you use TF and MXNet within the same script.
I had kind of that problem: when used together, different frameworks fight for the GPU memory (and in my experience, tensorflow is much more greedy on it).
Depending on model (how much GPU memory it consumes), I was able use MXNet and TF models together within different scripts/processes.

My method to block TF from taking all the GPU memory:

        def _prevent_tf_gpu_crash(fraction=.5):
            config = tf.compat.v1.ConfigProto()
            config.gpu_options.per_process_gpu_memory_fraction = fraction
            tf.compat.v1.keras.backend.set_session(tf.compat.v1.Session(config=config))


Maybe I can tell you more if you provide more details.





---
[Visit Topic](https://discuss.mxnet.io/t/two-models-in-file-mxnet-and-tensorflow/6555/2) or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.mxnet.io/email/unsubscribe/37f0526f69be6eebdecdce3d12d7f3e1ddbe8e64f9288d339ed7e074c502a06c).