I'm new to the TensorFlow world so please bear with me.
I am currently using an M1 MacBook Pro, and followed these instructions to install TensorFlow using Conda: https://towardsdatascience.com/installing-tensorflow-on-the-m1-mac-410bb36b776
All the code runs fine on the Jupyter Notebook until I try to fit the model:
initial_epochs = 5
history = model.fit(train_dataset, validation_data=validation_dataset, epochs=initial_epochs)
However, after training for 2175/2176 training examples on the 1st epoch, a pop-up always appears noting that the kernel has died and has to restart. For reference, here's the output before that pop-up occurs:
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
I'd really appreciate any help on this, as I've been struggling for a while on this already!
Thank you.
You can check out using the GPU accelerator available in Runtime-Change runtime type-Hardware Accelerator
. Depending on the size of dataset that you have, you may want to consider Colab Pro, or TPU.
--below is 07/15/21 updated--
My previous answer is about Colab, sorry that I missed the topic. For Jupyter Notebook there should be a panel where restarting the dead kernel is possible.
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.