# Problem with CuDNN initialization

## post by WinSurfer on Dec 10, 2020

Dear Technical help,

I have installed lambda-stack in my system (ubuntu) and installed Pycharm with the “inherit global site-packages” setting to use the lambda-stack environment.

However, when I try to run some demo Tensorflow jobs, I got the error of CuDNN initialization (figure attached). Do you have any suggestions for fixing this problem?

Many thanks!

## post by jeremy on Dec 14, 2020

Try adding the following after importing Tensorflow:

```lua
for device in tf.config.experimental.list_physical_devices('GPU'):
    tf.config.experimental.set_memory_growth(device, True)
```

### Related topics

| Topic | Replies | Views | Activity |
| --- | --- | --- | --- |
| [Lambda Stack - CUDNN 8 Upgrade Query](https://deeptalk.lambda.ai/t/lambda-stack-cudnn-8-upgrade-query/1966) | [8](https://deeptalk.lambda.ai/t/lambda-stack-cudnn-8-upgrade-query/1966/1) | 4.7k | [Apr 2021](https://deeptalk.lambda.ai/t/lambda-stack-cudnn-8-upgrade-query/1966/9) |
| [cuDNN Install w/ Lambda Stack](https://deeptalk.lambda.ai/t/cudnn-install-w-lambda-stack/3204) | [1](https://deeptalk.lambda.ai/t/cudnn-install-w-lambda-stack/3204/1) | 1.7k | [Sep 2022](https://deeptalk.lambda.ai/t/cudnn-install-w-lambda-stack/3204/2) |
| [Could not load library libcudnn_adv_train.so.8 error on lambda workstation](https://deeptalk.lambda.ai/t/could-not-load-library-libcudnn-adv-train-so-8-error-on-lambda-workstation/2698) | [5](https://deeptalk.lambda.ai/t/could-not-load-library-libcudnn-adv-train-so-8-error-on-lambda-workstation/2698/1) | 7.1k | [Sep 2022](https://deeptalk.lambda.ai/t/could-not-load-library-libcudnn-adv-train-so-8-error-on-lambda-workstation/2698/6) |
| [RuntimeError: cuDNN version mismatch: PyTorch was compiled against 7005 but linked against 7102](https://deeptalk.lambda.ai/t/runtimeerror-cudnn-version-mismatch-pytorch-was-compiled-against-7005-but-linked-against-7102/305) | [1](https://deeptalk.lambda.ai/t/runtimeerror-cudnn-version-mismatch-pytorch-was-compiled-against-7005-but-linked-against-7102/305/1) | 4.0k | [May 2018](https://deeptalk.lambda.ai/t/runtimeerror-cudnn-version-mismatch-pytorch-was-compiled-against-7005-but-linked-against-7102/305/2) |
| [Updated Lambda Stack and now have a PyTorch CuDNN version mismatch Error [resolved]](https://deeptalk.lambda.ai/t/updated-lambda-stack-and-now-have-a-pytorch-cudnn-version-mismatch-error-resolved/629) | [5](https://deeptalk.lambda.ai/t/updated-lambda-stack-and-now-have-a-pytorch-cudnn-version-mismatch-error-resolved/629/1) | 3.9k | [Dec 2018](https://deeptalk.lambda.ai/t/updated-lambda-stack-and-now-have-a-pytorch-cudnn-version-mismatch-error-resolved/629/7) |
