-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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
LSTM CudaNdarrayType(float32, col)' and 'CudaNdarrayType(float32, matrix) error #3641
Comments
I met the same problem. |
i met the same problem. if i use model.add(LSTM(2, return_sequences=True)) instead of model.add(LSTM(1, return_sequences=True)), it's just fine. |
again,i saw people run in #3086: inputs = Input(shape=(3,6)) model.predict(a) but for me, it reports the same error:"Inconsistency in the inner graph of scan 'scan_fn' : an input and an output are associated with the same recurrent state and should have the same type but have type 'CudaNdarrayType(float32, col)' and 'CudaNdarrayType(float32, matrix)' respectively.") |
I'll try to explain. The problem is how Theano is used. We could relax that The problem is that a recurrent state is defined as being a col, a matrix So what to do? There is a few options. 1 Make the original state a matrix. This is what happen when the shape is 2 you could tell Theano that the output is really a col. Similar to adding Le 22 sept. 2016 06:24, "cbdbdd" notifications@github.com a écrit :
|
Thanks patyork for the redirection! So there is no solution yet? |
I think a PR was merged (or submited) in keras that work around this.
…On Sun, Jan 22, 2017 at 12:31 AM, Yun Wang (Maigo) ***@***.*** > wrote:
Thanks patyork for the redirection! So there is no solution yet?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3641 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALC-wVWgwZQ_bFOrJZ-CV5x0ojTcGB2ks5rUunHgaJpZM4Jxa6C>
.
|
@nouiz |
I used LSTM to solve my question. When I upgrade my environment I meet some error.
data.shape : (191, 128, 130)
label.shape : (191, 128, 1)
The cause of error is the dimension of label is 1. I have tried to use label.shape =(191, 128, 2), in this case, there is no error.
environment and version:
Ubuntu 14.04.4
Theano (0.9.0dev2)
Keras (1.0.8)
Code:
Error:
The text was updated successfully, but these errors were encountered: