# Problem with CuDNN initialization

**URL:** <https://deeptalk.lambda.ai/t/problem-with-cudnn-initialization/2034>\
**Category:** Technical Help\
**Created:** [December 10, 2020, 12:31pm UTC](https://deeptalk.lambda.ai/t/problem-with-cudnn-initialization/2034 "2020-12-10T12:31:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WinSurfer](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@WinSurfer](https://deeptalk.lambda.ai/u/WinSurfer)\
**Post date:** [December 10, 2020, 12:31pm UTC](https://deeptalk.lambda.ai/t/problem-with-cudnn-initialization/2034/1 "2020-12-10T12:31:17Z")

</div>

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?

 ![Error_Capture](https://us1.discourse-cdn.com/flex019/uploads/deeptalk/original/1X/23bc84bfca40d53b38fb2784d2cdf0b3bb2d194a.PNG)

Many thanks!

---

<div class="post-metadata">

**Author:** ![jeremy](https://sea1.discourse-cdn.com/flex019/user_avatar/deeptalk.lambda.ai/jeremy/32/235_2.png) [@jeremy](https://deeptalk.lambda.ai/u/jeremy)\
**Post date:** [December 14, 2020, 2:15pm UTC](https://deeptalk.lambda.ai/t/problem-with-cudnn-initialization/2034/2 "2020-12-14T14:15:10Z")

</div>

Try adding the following after importing Tensorflow:

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

```
