Ядро Jupyter Notebook умирает

Я новичок в мире TensorFlow, поэтому, пожалуйста, потерпите меня.

В настоящее время я использую M1 MacBook Pro и следовал этим инструкциям, чтобы установить TensorFlow с помощью Conda: 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)

Однако после обучения на обучающих примерах 2175/2176 на 1-й эпохе всегда появляется всплывающее окно с сообщением о том, что ядро ​​умерло и его необходимо перезапустить. Для справки, вот вывод до появления этого всплывающего окна:

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

Я был бы очень признателен за любую помощь в этом, так как я уже некоторое время боролся с этим!

Спасибо.


person KYLZ    schedule 15.07.2021    source источник


Ответы (1)


Вы можете проверить с помощью ускорителя графического процессора, доступного в Runtime-Change runtime type-Hardware Accelerator. В зависимости от размера имеющегося у вас набора данных вы можете рассмотреть Colab Pro или TPU.

--ниже обновлено 15.07.21--

Мой предыдущий ответ о Colab, извините, что пропустил тему. Для Jupyter Notebook должна быть панель, где возможен перезапуск мертвого ядра.

person Qiyu Zhong    schedule 15.07.2021