InternalError Blas GEMM launch failed a shape 128 122 b shape 122 64 m 128 n 64 k 122

0 votes

When I run this model using python:

def build_network(): models = [] model = Sequential() model.add(Dense(64, input_dim=122)) model.add(Dense(32)) model.add(Activation('relu')) model.add(Dropout(.15)) model.add(Dense(32)) model.add(Activation('relu')) model.add(Dropout(.15)) model.add(Dense(32)) model.add(Activation('relu')) model.add(Dropout(.15)) model.add(Dense(5)) model.add(Activation('softmax')) model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) return model NN = build_network() early_stopping = EarlyStopping(monitor='val_loss', min_delta=0, patience=3, verbose=0, mode='auto'), y=target, epochs=100, validation_split=0.1, batch_size=128, callbacks=[early_stopping])

I receive this error:

InternalError: Blas GEMM launch failed : a.shape=(128, 122), b.shape=(122, 64), m=128, n=64, k=122 [[{{node dense_6/MatMul}}]]

May 14, 2020 by arezoo
• 220 points

edited May 14, 2020 by Gitika 752 views

Hey, @Arezoo,

This error is a Cuda error because the GPU is running out of memory, doesn't have enough compute capacity, or there's a driver issue.

Can you confirm that none of these issues is happening with you here?

1 answer to this question.

0 votes


I don't know, could you please help me to check and resolved this problem?

answered May 17, 2020 by arezoo
• 220 points

Hey, @Arezoo,

Do this and revert me back with the output. run nvidia-smi to check you have no other processes using the GPU running and revert me the output you are getting while running the command.


I run this command in command prompt and received this error,

C:\Users\Administrator> nvidia-smi
'nvidia-smi' is not recognized as an internal or external command,
operable program or batch file.

and I run in the consle of spyder and received this error,

Traceback (most recent call last):

  File "<ipython-input-5-a5d968248d17>", line 1, in <module>

NameError: name 'nvidia' is not defined

where do I  execute this command(nvidia-smi)?

Related Questions

0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,481 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
+2 votes
2 answers

How can I plot a k-dsitance graph using python?

Hi there, instead of sklearn you could ...READ MORE

answered Apr 10, 2018 in Python by charlie_brown
• 7,780 points
0 votes
1 answer

What are the parameters in local[a,b,c] explains?

SparkContext.createTaskScheduler property parses the master parameter Local: 1 ...READ MORE

answered May 29, 2018 in Apache Spark by Shubham
• 13,480 points
0 votes
1 answer

Does a 32-bit byte code work in 64-bit JVM?

Yes, Java bytecode (and source code) is ...READ MORE

answered Jun 5, 2018 in Java by sophia
• 1,400 points
+1 vote
2 answers

Is there a code to find 64-bit JVM or 32-bit JVM (from within a program)?

Do I need to understand the difference ...READ MORE

answered Jun 11, 2019 in Java by Jim
• 810 points