-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
3.6.1-1 causing issues on M1 #590
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
What version of JupyterLab Desktop were you previously using on your M1 Mac? On your M1 Mac, if you uninstall JupyterLab Desktop and install version 3.6.1-1 again, do you still see this problem? I'm curious about whether this is a bug with the upgrade flow. |
@ImolaS3 Can you provide the info requested above, please? |
Without the info requested above, it's not possible to reproduce and diagnose this bug. Closing this for now; please reopen with the requested information. Thanks! |
I was prompted to update to 3.6.1 on my M1 mac and now I can't run several programs that previously worked fine, and they still work on my intel mac running 3.6.1
The code starts to process and after a few seconds, I get an error "Kernel Restarting The kernel appears to have died. It will restart automatically"
This is on code that ran fine before the update
if it helps, one of the programs giving this errors is:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # hide info and warning messages from tensorflow, but not errors
from tensorflow import keras
from keras import Sequential
from keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, Flatten
import numpy as np
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
data = pd.read_csv('/Users/antonysutton/My Drive/Documents/Design_and_analysis/Data sets/handwritten data set/A_Z Handwritten Data.csv')
feature = data.iloc[:, data.columns != '0'].values
label = data[data.columns[0]].values
x_train, x_test, y_train, y_test = train_test_split(feature, label, test_size=0.2)
x_train = np.array(x_train)
y_train = np.array(y_train)
x_test = np.array(x_test)
y_test = np.array(y_test)
print(x_train.shape)
x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)
x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)
x_train = x_train / 255.
x_test = x_test / 255.
print(x_train.shape)
model = Sequential([
Conv2D(64, (5, 5), input_shape=(28, 28, 1), activation="relu"),
MaxPooling2D(pool_size=(2, 2)),
Dropout(0.25),
Conv2D(32, (5, 5), input_shape=(28, 28, 1), activation="relu"),
MaxPooling2D(pool_size=(2, 2)),
Dropout(0.25),
Flatten(),
Dense(64, activation='relu'),
Dropout(0.4),
Dense(26, activation='softmax'),
])
model.compile(
optimizer=keras.optimizers.Adam(learning_rate=0.001),
loss=keras.losses.SparseCategoricalCrossentropy(),
metrics=[keras.metrics.SparseCategoricalAccuracy()]
)
model.fit(x_train, y_train, epochs=20, batch_size=64, validation_data=(x_test, y_test))
def show_example(index, preds, dsx, dsy):
current_img = dsx[index][:, :, 0] * 255
prediction = np.argmax(preds[index])
if(len(dsy) > 0 or dsy != None) :
label = dsy[index]
print("Label:", label)
print("Prediction:", prediction)
plt.imshow(current_img, interpolation='nearest', cmap='gray')
plt.show()
show_example(9, preds, x_test, y_test), show_example(23, preds, x_test, y_test)
def analysis(preds, limit, dsx, dsy):
correct = 0
misclassified = []
for i in range(limit):
prediction = np.argmax(preds[i])
label = dsy[i]
if(prediction == label):
correct += 1
else:
misclassified.append(i)
preds = model.predict(x_test)
analysis(preds, x_test.shape[0], x_test, y_test)
def predict(filepath, submitfile):
X_test = pd.read_csv(filepath) # 测试数据存放于 test.cv
The text was updated successfully, but these errors were encountered: