简体   繁体   中英

Jupyter Kernel Dies when Running TensorFlow Model

While training a TensorFlow Model in Jupyter, the kernel dies before the first epoch.

The model I am using is a DeepLab with input size 256 on a ResNet50 encoder. I cannot show the model summary because it is too long to fit in the question. This issue only happens with this specific model and does not occur with others that I have used.

Here is the output of the cell when I try to train the model:

Epoch 1/100
2023-01-07 12:22:01.752760: W tensorflow/tsl/platform/profile_utils/cpu_utils.cc:128] Failed to get CPU frequency: 0 Hz
2023-01-07 12:22:05.727903: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:114] Plugin optimizer for device_type GPU is enabled.
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details.
Canceled future for execute_request message before replies were done

This issue occurs in both VSCode Jupyter and Jupyter Notebook/Lab.

I have tried restarting the kernel, reinstalling tensorflow, creating a new environment, and using the nomkl library. I am on an M1 MacBook Pro running Tensorflow 2.11.0 (macos). The python version is 3.10.

Problem solved by running in Colab. I just downloaded the weights and log files from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM