Kernel keeps dying in tensorflow on jupyter

Hi Team,

I am using a Macbook pro 14 with macOS version 13.1. The jupyter kernel dies when I try to run the below cell

data_augmentation = tf.keras.Sequential([
  tf.keras.layers.experimental.preprocessing.RandomFlip("horizontal", 
  input_shape=(112, 112, 3)),
  tf.keras.layers.experimental.preprocessing.RandomRotation(0.2),
  tf.keras.layers.experimental.preprocessing.RandomZoom(0.2),
  tf.keras.layers.experimental.preprocessing.RandomHeight(0.2),
  tf.keras.layers.experimental.preprocessing.RandomWidth(0.2),
  tf.keras.layers.experimental.preprocessing.Rescaling(1./255)
], name ="data_augmentation")

I am using tensorflow-deps 2.10.0 with tensorflow-macos 2.10.0 and tensorflow-metal 0.5.0, python version 3.8

I tried using tensorflow-macos 2.11.0 but there is no tensorflow-deps for that version and it gives me errors when trying to fit the model so I downgraded to 2.10.0.

Please let me know a solution for the same.

Ouput of the jupyter shell when kernel restarts

I solved it by upgrading tensorflow-metal to 0.6.0

Kernel keeps dying in tensorflow on jupyter
 
 
Q