'Kernel Keeps Dying when Running the Jupyter Notebook import cell

I am trying to run a Python Jupyter Notebook for a Deep Learning Algorithm. The problem I keep running into is that the kernel keeps dying whenever I try to run even the import statements. I am slightly confused as to what is going on due to the fact that I have ran other similar notebooks without any issues. If it helps it is a GAN MINST computation. I am running Jupyter Notebooks from from an Anaconda installation and I did upgrade to the latest version with conda. Here is the import statement which is where it fails without even getting to the code.

import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

import os, time, itertools, imageio, pickle import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import input_data

tf.compat.v1.disable_eager_execution()

I appreciate any help or feedback!



Solution 1:[1]

The problem might be cause by the use of an old Tensorflow version. This is the associated issue:

https://github.com/tensorflow/tensorflow/issues/31870

A solution might be to update your Tensorflow version. Please also make sure to write your code as an actual code cell when posting such questions (using ` 3 times gives you code ).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mariusmarten