TensorFlow on M1, kernel crashing in notebooks

Kia ora,

Been having heaps of trouble recently trying to get TensorFlow working, it just suddenly stopped and the kernel would just crash every time I try to import tf.

I've tried just about everything eg. fresh install of python, reinstalling Xcode dev tools

Below is the relevant lines of pip freeze, using python 1.10.13 btw

tensorboard==2.15.1
tensorboard-data-server==0.7.2
tensorboard-plugin-wit==1.8.1
tensorflow==2.15.0
tensorflow-estimator==2.15.0
tensorflow-io-gcs-filesystem==0.34.0
tensorflow-macos==2.15.0
tensorflow-metal==0.5.0

Below is the cell in question that is killing the kernal

import tensorflow as tf import matplotlib.pyplot as plt
import tensorflow_datasets as tfds
from tensorflow.keras.layers import Conv2D, MaxPool2D, Dense, Flatten, InputLayer, BatchNormalization, Dropout
from tensorflow.keras.losses import BinaryCrossentropy
from tensorflow.keras.optimizers.legacy import Adam

I'll be around all day so if you have anything that can help, I'll be sure to give it a go as soon as you post it and get back to you!

Looking forward to your replies.

Nga mihi, Kane

Post not yet marked as solved Up vote post of kaneviggers Down vote post of kaneviggers
387 views