Skip to content

AttributeError with limit_gpu_memory #40

@flevet

Description

@flevet

Hi,

I just installed CSBDeep and I would be interested in using the limit_gpu_memory. When uncommented in the jupyter notebook, I have this error :

AttributeError                            Traceback (most recent call last)
<ipython-input-2-4d7e1208218d> in <module>
----> 1 limit_gpu_memory(fraction=0.5)

~\Anaconda3\envs\tf\lib\site-packages\csbdeep\utils\tf.py in limit_gpu_memory(fraction, allow_growth)
     43     fraction is None or (np.isscalar(fraction) and 0<=fraction<=1) or _raise(ValueError('fraction must be between 0 and 1.'))
     44 
---> 45     if K.tensorflow_backend._SESSION is None:
     46         config = tf.ConfigProto()
     47         if fraction is not None:

AttributeError: module 'keras.backend.tensorflow_backend' has no attribute '_SESSION'

Is it a problem related to versions of tensorflow-gpu, cuda and cuDNN ?

For information I'm using Anaconda with Python 3.7 and I created a specific environement:

conda create -n tf
conda activate tf
conda install tensorflow=1.14.0
conda install tensorflow-gpu=1.14.0
pip install csbdeep

Best,
Florian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions