I am a window10 user I m running tensorflow in jupyter notebook, perceptron works fine, but cnn kernel crashes. I also tried increasing the buffer size, but the kernel keeps crashing. I made a model with cnn in Kolab, and when I download the model and run it with a Jupyter notebook, the kernel dies. Also, making a model with a jupyter notebook kills the kernel. In jupyter notebook, training with perceptron is possible, but with cnn it always kills the kernel. But .summary() works. What s wrong?
import numpy as np
import tensorflow as tf
testcnn=tf.keras.models.load_model("my_lasthomework_cnn.h5")
testcnn.summary()
import pandas as pd
from PIL import Image
test_dir= dir
test_csv = pd.read_csv(test_dir+ test.csv )
test_images=[]
for file in test_csv[ data ]:
image=np.array(Image.open(test_dir+ test/ +file))
test_images.append(image)
test_images=np.array(test_images)
for i in test_images:
p1=testcnn.predict(i.reshape(1,64,64,3))
print(np.argmax(p1))