BLAS error at backward of F.sum of L.Convolution2d
See original GitHub issueThe 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()
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI:
F.mean
is also affected by this issue.h = h[:]
beforeF.sum(h)
orF.mean(h)
.Ah, thanks, I overlooked the link. The corresponding PR is #9177.