help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lost with working/non-working code


From: Alberto Simões
Subject: Re: Lost with working/non-working code
Date: Sat, 1 Mar 2014 16:17:18 +0000

Hello, again

Thank you all for the help, but it seems that it is my mac-homebrew-compiled octave that is segfaulting in a way it shouldn't. The same code running on a Linux works like a charm.

Thank you and sorry for the noise,
Alberto


On Sat, Mar 1, 2014 at 3:24 PM, Alberto Simões <address@hidden> wrote:
Hello


On Sat, Mar 1, 2014 at 3:15 PM, João Rodrigues <address@hidden> wrote:

  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.

Did you check the type (whos) and range of "i"?
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.

Yep, starting at 2, so that is not a problem.

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.

Yes,
        first    1578x1579                19933296  double
        second   1579x1                   12632:   double

Seems good :-|
It is strange because the input parameters are the same when I run or not the non-parallel function.

Thanks


--
Alberto Simões



--
Alberto Simões

reply via email to

[Prev in Thread] Current Thread [Next in Thread]