question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BLAS error at backward of F.sum of L.Convolution2d

See original GitHub issue

The code below terminates unsuccessfully with the message:

BLAS error: Parameter incX passed to cblas_sgemv was 0, which is invalid.

With h = h[:,:,:,:], it causes no errors. This behavior seems to be a bug.

import chainer
import chainer.functions as F
import chainer.links as L
import numpy as np

conv = L.Convolution2D(3, 1, 3)

conv.cleargrads()

x = np.random.rand(300).astype(np.float32).reshape(1,3,10,10)
h = conv(x)
print(h.data)
# h = h[:,:,:,:]
y = F.sum(h, axis=(2,3))
print(y.data)
y.backward()

log.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
muupancommented, Jul 25, 2017

FYI:

0reactions
kmaehashicommented, Jul 4, 2018

Ah, thanks, I overlooked the link. The corresponding PR is #9177.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BLAS error at backward of F.sum of L.Convolution2d · Issue #2744 ...
The code below terminates unsuccessfully with the message: BLAS error: Parameter incX passed to cblas_sgemv was 0, which is invalid.
Read more >
CS231n Convolutional Neural Networks for Visual Recognition
In general, setting zero padding to be P=(F−1)/2 when the stride is S=1 ... The backward pass for a convolution operation (for both...
Read more >
Train linear model on predictions - | notebook.community
We can use keras to create a simple linear model (Dense() - with no activation - in Keras) and optimize it using SGD...
Read more >
Chainer Documentation - Read the Docs
This runs error backpropagation (a.k.a. backprop or reverse-mode automatic differentiation). ... self.add_link('conv3', L.Convolution2D(16, 120, 4, 1)).
Read more >
Chainer Documentation
This runs error backpropagation (a.k.a. backprop or reverse-mode automatic ... the numerical gradients of sum(f(x)), where sum indicates the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found