繁体   English   中英

Jupyter Notebook 内核死了

[英]Jupyter Notebook Kernel Dies

我是 TensorFlow 世界的新手,所以请耐心等待。

我目前使用的是 M1 MacBook Pro,并按照以下说明使用 Conda 安装 TensorFlow: https ://towardsdatascience.com/installing-tensorflow-on-the-m1-mac-410bb36b776

在我尝试拟合模型之前,所有代码在 Jupyter Notebook 上都运行良好:

initial_epochs = 5
history = model.fit(train_dataset, validation_data=validation_dataset, epochs=initial_epochs)

但是,在第 1 个 epoch 对 2175/2176 个训练示例进行训练后,总是会出现一个弹出窗口,指出内核已死并且必须重新启动。 作为参考,这是弹出窗口发生之前的输出:

Epoch 1/5
WARNING:tensorflow:AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x17934f040> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: unsupported operand type(s) for -: 'NoneType' and 'int'
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
WARNING: AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x17934f040> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: unsupported operand type(s) for -: 'NoneType' and 'int'
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
2175/2176 [============================>.] - ETA: 0s - loss: 1.6207 - accuracy: 0.5527

我真的很感激这方面的任何帮助,因为我已经为此苦苦挣扎了一段时间!

谢谢你。

您可以使用Runtime-Change runtime type-Hardware Accelerator提供的 GPU 加速器进行检查。 根据您拥有的数据集的大小,您可能需要考虑 Colab Pro 或 TPU。

-- 以下是 07/15/21 更新--

我之前的回答是关于 Colab,抱歉我错过了这个话题。 对于 Jupyter Notebook,应该有一个面板可以重新启动死内核。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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