Python Jupyter Notebook: Kernel Dies and OMP: Error #15

Python Jupyter Notebook: Kernel Dies and OMP: Error #15

I am trying to run a Python script under Jupyter Notebook ( Anaconda3-2023.03-1-Windows-10_Pro x86_64).

I import the following Python Libraries and Data:

import tensorflow

from tensorflow.keras import layers, models

import matplotlib.pyplot as mplot

from keras.datasets import cifar10

import numpy as np

I have attached the following text file:

Neural Networks Program 04.docx which includes both the Python Code and the Output.

A: When the section involving MatPlotLib constructing a graph is executed , The Kernel Fails.

B: When I inspected the Jupyter Notebook Log; it displayed the following message:

C: OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5 already initialized.

OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results.

The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library.

As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results.

For more information, please see

I would appreciate it if someone could help me to diagnose and understand this problem so that I can prevent this error as well as the Kernel dying.