【问题标题】:keras errors with theano/tensowflow backendtheano / tensowflow后端的keras错误
【发布时间】:2016-09-17 18:22:35
【问题描述】:

我在使用 keras 的时候发现了一些奇怪的问题。 我的系统是ubuntu 14.04/64bit

theano 后端错误信息:

Using Theano backend.
Using gpu device 0: Tesla K20Xm (CNMeM is enabled with initial size: 80.0% of memory, cuDNN not available)
Train on 1000 samples, validate on 100 samples
Epoch 1/5
Floating point exception (core dumped)

tensorflow 支持的错误信息:

F tensorflow/stream_executor/cuda/cuda_driver.cc:316] current context was not created by the StreamExecutor cuda_driver API: 0x2420480; a CUDA runtime call was likely performed without using a StreamExecutor context

当我使用theano运行CNN和tensowflow运行LSTM时就可以了。 但是当我用theano跑LSTM或者用tensorflow跑CNN的时候,报错了。

而且它通常是一些程序加载 80% 的 gpu 内存并且从未真正运行过。或者有时CPU结果的结果相差很大。(CPU结果是正确的)

【问题讨论】:

    标签: tensorflow deep-learning theano keras


    【解决方案1】:

    当您有另一个程序同时访问 GPU 时,Tensorflow 会出现此问题。在您的情况下,很明显 Theano 是在 Tensorflow 之前加载的。因此,您在 Keras Theano 中的代码中的某处都被意外加载了。避免此问题的一种可靠方法是卸载 Theano(从您当前的 conda env/virtualenv 中)。

    【讨论】:

      猜你喜欢
      • 2017-06-27
      • 2018-04-26
      • 1970-01-01
      • 1970-01-01
      • 2016-07-13
      • 1970-01-01
      • 2020-07-26
      • 2016-09-02
      • 1970-01-01
      相关资源
      最近更新 更多