Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Restarting : C2, Week 3 #44

Open
AlexandrosTr opened this issue Jul 13, 2023 · 0 comments
Open

Kernel Restarting : C2, Week 3 #44

AlexandrosTr opened this issue Jul 13, 2023 · 0 comments

Comments

@AlexandrosTr
Copy link

AlexandrosTr commented Jul 13, 2023

Hello everyone,

So i tried to run the code in the file "Tensorflow_Introduction_new.ipybd" part of C2, Week3
but when it comes at the part of plotting images, the Kernel restarts.

Additionally when i am trying to plot the same data combining Numpy & Matplotlib, hence using another Format,
the images are plotted with no issues in this case.

----------------------------------

images_iter = iter(x_train)
labels_iter = iter(y_train)
plt.figure(figsize=(10, 10))
for i in range(25):
ax = plt.subplot(5, 5, i + 1)
plt.imshow(next(images_iter).numpy().astype("uint8"))
plt.title(next(labels_iter).numpy().astype("uint8"))
plt.axis("off")

----------------------------------

Extra Info: Apparently there is no problem to plot the data before running the following code,
after this part i am no longer able to plot any data because the Kernel Restarts

----------------------------------

x_train = tf.data.Dataset.from_tensor_slices(train_dataset['train_set_x'])
y_train = tf.data.Dataset.from_tensor_slices(train_dataset['train_set_y'])

x_test = tf.data.Dataset.from_tensor_slices(test_dataset['test_set_x'])
y_test = tf.data.Dataset.from_tensor_slices(test_dataset['test_set_y'])

----------------------------------

Has anyone else countered this problem before !?

Thank you in advance !

I am using "TensorFlow v2.10" and i have already update Matplotlib at its newest version.

Capture

Capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant