Home>

CNN is configured using Tensorflow (keras) with Jypyter, and the kernel terminates abnormally when the fitting code is executed.

Running in Jupyter environment

In this event, jupyter does not display Warning etc. in the output frame of the result, but displays the following message in the window and dies.

Kernel is rebooting
It seems that the kernel has terminated abnormally. It will restart automatically.
Run in a python file

I couldn't figure out the cause from just ↑, so when I wake it up in a script and execute it, the following error appears this time.

2021-01-01 16: 20: 37.030154: I tensorflow/core/platform/cpu_feature_guard.cc: 145] This TensorFlow binary is optimized with Intel (R) MKL-DNN to use the following CPU instructions in performance critical operations: SSE4. 1 SSE4.2 AVX AVX2 AVX512F FMA
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.
2021-01-01 16: 20: 37.030423: I tensorflow/core/common_runtime/process_util.cc: 115] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance.
Train on 22967 samples, validate on 5742 samples
Epoch 1/50
python (14456,0x7000076fc000) malloc: Incorrect checksum for freed object 0x7fed99d3d868: probably modified after being freed.
Corrupt value: 0x10400076fa040
python (14456,0x7000076fc000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort python test.py


I checked malloc etc., but I couldn't find a solution. .. ..

I am using a Mac and the list of anaconda virtual environment is

#Name Version Build Channel
_tflow_select 2.3.0 mkl
absl-py 0.11.0 pyhd3eb1b0_1
appnope 0.1.2 py36hecd8cb5_1001
argon2-cffi 20.1.0 py36haf1e3a3_1
astor 0.8.1 py36_0
async_generator 1.10 py36h28b3542_0
attrs 20.3.0 pyhd3eb1b0_0
backcall 0.2.0 py_0
blas 1.0 mkl
bleach 3.2.1 py_0
brotlipy 0.7.0 py36h9ed2024_1003
c-ares 1.17.1 h9ed2024_0
ca-certificates 2020.12.8 hecd8cb5_0
certifi 2020.12.5 py36hecd8cb5_0
cffi 1.14.4 py36h2125817_0
chardet 4.0.0 py36hecd8cb5_1003
cryptography 3.3.1 py36hbcfaee0_0
cycler 0.10.0 py36hecd8cb5_0
dbus 1.13.18 h18a8e69_0
decorator 4.4.2 py_0
defusedxml 0.6.0 py_0entrypoints 0.3 py36_0
expat 2.2.10 hb1e8313_2
freetype 2.10.4 ha233b18_0
gast 0.2.2 py36_0
gettext 0.19.8.1 hb0f4f8b_2
glib 2.66.1 h9bbe63b_0
google-pasta 0.2.0 py_0
grpcio 1.31.0 py36h7580e61_0
h5py 2.10.0 py36h0601b69_1
hdf5 1.10.6 hdbbcd12_0
icu 58.2 h0a44026_3
idna 2.10 py_0
imageio 2.9.0 pypi_0 pypi
importlib-metadata 2.0.0 py_1
importlib_metadata 2.0.0 1
intel-openmp 2019.4 233
ipykernel 5.3.4 py36h5ca1d4c_0
ipython 7.16.1 py36h5ca1d4c_0
ipython_genutils 0.2.0 pyhd3eb1b0_1
ipywidgets 7.6.0 pyhd3eb1b0_1
jedi 0.18.0 py36hecd8cb5_0
jinja2 2.11.2 py_0
joblib 1.0.0 pypi_0 pypi
jpeg 9b he5867d9_2
json5 0.9.5 py_0
jsonschema 3.2.0 py_2
jupyter 1.0.0 py36_7
jupyter_client 6.1.7 py_0
jupyter_console 6.2.0 py_0
jupyter_core 4.7.0 py36hecd8cb5_0
jupyterlab 2.2.6 py_0
jupyterlab_pygments 0.1.2 py_0
jupyterlab_server 1.2.0 py_0
keras-applications 1.0.8 py_1
keras-preprocessing 1.1.0 py_1
kiwisolver 1.3.0 py36h23ab428_0
lcms2 2.11 h92f6f08_0
libcxx 10.0.0 1
libedit 3.1.20191231 h1de35cc_1
libffi 3.3 hb1e8313_2
libgfortran 3.0.1 h93005f0_2libiconv 1.16 h1de35cc_0
libpng 1.6.37 ha441bb4_0
libprotobuf 3.13.0.1 hab81aa3_0
libsodium 1.0.18 h1de35cc_0
libtiff 4.1.0 hcb84e12_1
lz4-c 1.9.2 h79c402e_3
markdown 3.3.3 py36hecd8cb5_0
markupsafe 1.1.1 py36h1de35cc_0
matplotlib 3.3.2 hecd8cb5_0
matplotlib-base 3.3.2 py36h181983e_0
mistune 0.8.4 py36h1de35cc_0
mkl 2019.5 intel_281 intel
mkl-service 2.3.0 py36h9ed2024_0
mkl_fft 1.2.0 py36hc64f4ea_0
mkl_random 1.1.1 py36h959d312_0
nbclient 0.5.1 py_0
nbconvert 6.0.7 py36_0
nbformat 5.0.8 py_0
ncurses 6.2 h0a44026_1
nest-asyncio 1.4.3 pyhd3eb1b0_0
notebook 6.1.6 py36hecd8cb5_0
numpy 1.19.2 py36h456fd55_0
numpy-base 1.19.2 py36hcfb5961_0
olefile 0.46 py36_0
openssl 1.1.1i h9ed2024_0
opt_einsum 3.1.0 py_0
packaging 20.8 pyhd3eb1b0_0
pandas 1.1.5 py36hb2f4e1b_0
pandoc 2.11 h0dc7051_0
pandocfilters 1.4.3 py36hecd8cb5_1
parso 0.7.0 py_0
pcre 8.44 hb1e8313_0
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 8.0.1 py36h5270095_0
pip 20.3.3 py36hecd8cb5_0
prometheus_client 0.9.0 pyhd3eb1b0_0
prompt-toolkit 3.0.8 py_0
prompt_toolkit 3.0.8 0
protobuf 3.13.0.1 py36hb1e8313_1
ptyprocess 0.6.0 pyhd3eb1b0_2pycparser 2.20 py_2
pygments 2.7.3 pyhd3eb1b0_0
pyopenssl 20.0.1 pyhd3eb1b0_1
pyparsing 2.4.7 py_0
pyqt 5.9.2 py36h655552a_2
pyrsistent 0.17.3 py36haf1e3a3_0
pysocks 1.7.1 py36hecd8cb5_0
python 3.6.12 h26836e1_2
python-dateutil 2.8.1 py_0
pytz 2020.5 pyhd3eb1b0_0
pyzmq 20.0.0 py36h23ab428_1
qt 5.9.7 h468cd18_1
qtconsole 4.7.7 py_0
qtpy 1.9.0 py_0
readline 8.0 h1de35cc_0
requests 2.25.1 pyhd3eb1b0_0
scikit-learn 0.24.0 pypi_0 pypi
scipy 1.5.2 py36h912ce22_0
send2trash 1.5.0 pyhd3eb1b0_1
setuptools 51.0.0 py36hecd8cb5_2
sip 4.19.8 py36h0a44026_0
six 1.15.0 py36hecd8cb5_0
sklearn 0.0 pypi_0 pypi
sqlite 3.33.0 hffcf06c_0
tbb 2019.6 intel_233 intel
tensorboard 2.0.0 pyhb38c66f_1
tensorflow-base 2.0.0 mkl_py36h66b1bf0_0
tensorflow-estimator 2.0.0 pyh2649769_0
termcolor 1.1.0 py36_1
terminado 0.9.1 py36_0
testpath 0.4.4 py_0
threadpoolctl 2.1.0 pypi_0 pypi
tk 8.6.10 hb0a8c7a_0
tornado 6.1 py36h9ed2024_0
----


It becomes.
I'm sorry for the introductory question, but thank you.

  • Answer # 1

    https://stackoverflow.com/questions/313445
    It has been duplicated, but it has been resolved here.