Open Brunsea opened 3 years ago
Please update to Spyder 4.1.4. This problem should be fixed in that version.
Hi - I am also seeing this on Ubuntu 20.04 LTS - using Spyder 4.1.4 everything installed fresh this week. Any advice would be great :/ - Is it because the kernel restarts ? and the "pipe" gets broken as a result ?
ok - for me the issue has been resolved - needed to add the extended dependencies for QT:
Debian | apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 |
---|
as indicated at https://docs.anaconda.com/anaconda/install/linux/ :)
The other issue I came across after installing the above - I did not have enough memory for my data and it started failing again. Upping the accessible memory in the VM fixed this.
I am also having the same problem. After running
model.fit(x_train, y_train, epochs = 3)
I get:
Restarting kernel... [SpyderKernelApp] WARNING | No such comm:
Not too sure how to fix this.
I tried spyder 4.2.0, 4.1.5, 4.1.4, but still cannot fix the problem when running classifier.fit_generator(training_set, samples_per_epoch = 8000, nb_epoch = 25, validation_data = test_set, nb_val_samples = 2000)
I tried spyder 4.2.0, 4.1.5, 4.1.4, but still cannot fix the problem when running classifier.fit_generator(training_set, samples_per_epoch = 8000, nb_epoch = 25, validation_data = test_set, nb_val_samples = 2000)
I found the solution: import os os.environ['KMP_DUPLICATE_LIB_OK']='True' with these 2, we can run our code.
This solution works for me.
I tried spyder 4.2.0, 4.1.5, 4.1.4, but still cannot fix the problem when running classifier.fit_generator(training_set, samples_per_epoch = 8000, nb_epoch = 25, validation_data = test_set, nb_val_samples = 2000)
I found the solution: import os os.environ['KMP_DUPLICATE_LIB_OK']='True' with these 2, we can run our code.
This solution works for me
I had the same issue on Ubuntu 20.10 and spyder 4. None of the fixes worked!
I installed every dependency and qt5_default. I even tried with os.environ but the error is still there.
Moreover, I get the same error if I try a dummy plot (plotting a pair of useless boxplots).
Do you have any other suggestion?
I tried spyder 4.2.0, 4.1.5, 4.1.4, but still cannot fix the problem when running classifier.fit_generator(training_set, samples_per_epoch = 8000, nb_epoch = 25, validation_data = test_set, nb_val_samples = 2000)
I found the solution: import os os.environ['KMP_DUPLICATE_LIB_OK']='True' with these 2, we can run our code.
This solution works. I use sypder 4.2.3 using macOS Catalina (10.15.7)
Actual Behavior
[SpyderKernelApp] WARNING | No such comm: 01e3617ad51911ea820b8c8590441444
Anaconda or Miniconda version:
Operating System: MAC
CODA:
Importing the Keras libraries and packages
from keras.models import Sequential from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense
Initialising the CNN
classifier = Sequential()
Step 1 - Convolution
classifier.add(Convolution2D(32, 3, 3, input_shape = (64, 64, 3), activation = 'relu'))
Step 2 - Pooling
classifier.add(MaxPooling2D(pool_size = (2, 2)))
Adding a second convolutional layer
classifier.add(Convolution2D(32, 3, 3, activation = 'relu')) classifier.add(MaxPooling2D(pool_size = (2, 2)))
Step 3 - Flattening
classifier.add(Flatten())
Step 4 - Full connection
classifier.add(Dense(output_dim = 128, activation = 'relu')) classifier.add(Dense(output_dim = 1, activation = 'sigmoid'))
Compiling the CNN
classifier.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])
Part 2 - Fitting the CNN to the images
from keras.preprocessing.image import ImageDataGenerator
train_datagen = ImageDataGenerator(rescale = 1./255, shear_range = 0.2, zoom_range = 0.2, horizontal_flip = True)
test_datagen = ImageDataGenerator(rescale = 1./255)
training_set = train_datagen.flow_from_directory('dataset/training_set', target_size = (64, 64), batch_size = 32, class_mode = 'binary')
test_set = test_datagen.flow_from_directory('dataset/test_set', target_size = (64, 64), batch_size = 32, class_mode = 'binary')
classifier.fit_generator(training_set, samples_per_epoch = 8000, nb_epoch = 25, validation_data = test_set, nb_val_samples = 2000)