|
From: | Alberto Simões |
Subject: | Re: Lost with working/non-working code |
Date: | Sat, 1 Mar 2014 15:24:31 +0000 |
Did you check the type (whos) and range of "i"?
error: rparcellfun: subscript indices must be either positive integers less than 2^31 or logicals
Using the only way I know to debug in Octave (adding printfs), I managed to notice that crash is happening on this matrix multiplication:
a{i} = sigmoid(Thetas{i-1} * a{i-1});
I checked the matrices sizes and they are correct. I tried to put the multiplication outside the function call, and it fails as well.
It should be an integer, if your iteration starts at 1 then (i-1) would be zero, "i" should also be smaller than 2^31.
Assuming "i" is yielding valid iterators, did you check the type (whos) of Theta{i} and a{i}? Maybe they're not real but have some other type that doesn't allow matrix multiplication.
[Prev in Thread] | Current Thread | [Next in Thread] |