bugGNU Octave - Bugs: bug #39788, Vectorized computation of Sigmoid...

 
 

bug #39788: Vectorized computation of Sigmoid function causes segfault

Submitter:  None
Submitted:  Wed 14 Aug 2013 08:14:16 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Duplicate Assigned to:  None
Originator Name:  Tomáš Zaoral Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Aug 2013 11:59:00 AM UTC, comment #5: 

No, you are using the term itself correctly, but you have just demonstrated that you don't understand what mathematical operation is actually being performed by your code. Please ask on the help mailing list for support and tips, and please mention up front that it is a homework assignment if you do want to learn and not just get a quick answer :)

Also read http://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html

Closing this bug and marking as a duplicate that I reported earlier. I'm sorry that it does crash for you, but it's nothing that Octave is causing.

Mike Miller <mtmiller>
Group Member
Thu 15 Aug 2013 11:02:12 AM UTC, comment #4: 

I run Octave on Linux Mint 13, which is built upon Ubuntu repositories.

I installed with command:

  sudo apt-get install octave gnuplot

In  terms of vectorization, I admit that I am newbie to this term, so I probably misused it here. However, [1 2 3; 1 2 3; 1 2 3] / [1 2 3; 1 2 3; 1 2 3] = [1 1 1; 1 1 1; 1 1 1] then I don't see why my implementation of sigmoid function should be erroneous.

I will try out http://pad.lv/1156575 as soon as I get home.

Yes, it is a coursera.org ML (Standford) exercise.

Anonymous
Thu 15 Aug 2013 03:29:02 AM UTC, comment #3: 

I can confirm what you report, but it is not a bug in Octave. Rather there is a bug in your attempt to vectorize this routine. Unfortunately, since Octave crashes on your OS in this situation, I can see why you might think it's a bug in Octave.

Are you running Octave on Ubuntu? If so, please go to http://pad.lv/1156575 and click on the "Does this bug affect you?" link.

As to your function, please ask on the help list if you're having trouble figuring out how to properly vectorize. Also read the Octave manual for the difference between the "/" and "./" operators. Is this a homework problem for a machine learning class?

Mike Miller <mtmiller>
Group Member
Wed 14 Aug 2013 09:36:47 PM UTC, comment #2: 

Works for me as well, 3.6.4 on Ubuntu Linux.

Rik <rik5>
Group administrator
Wed 14 Aug 2013 08:44:01 PM UTC, comment #1: 

Can't reproduce. How did you obtain Octave? Did you build it yourself?

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 14 Aug 2013 08:14:16 PM UTC, original submission:  

==Code==============

function g = sigmoid(z)
    g = ones(size(z)) / (ones(size(z)) + exp(-z))
end


==Crash=============


>> z

z =

  -1000000         0   1000000
  -1000000         0   1000000

>> sigmoid(z)

 ** On entry to DLASCL parameter number  4 had an illegal value

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-15 mtmiller StatusWorks For Me Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #38575
    2013-08-14 rik5 Carbon-CopyRemoved 72865 -
    2013-08-14 jordigh StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code