MESSAGE
DATE | 2017-03-30 |
FROM | Ruben Safir
|
SUBJECT | Subject: [Learn] random weights
|
From learn-bounces-at-nylxs.com Thu Mar 30 13:36:22 2017 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id E3709161311; Thu, 30 Mar 2017 13:36:21 -0400 (EDT) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 43317160E77 for ; Thu, 30 Mar 2017 13:36:18 -0400 (EDT) Received: from [172.22.149.146] (182631b.cst.lightpath.net [24.38.3.27]) by mailbackend.panix.com (Postfix) with ESMTPSA id 60B341A102; Thu, 30 Mar 2017 13:36:18 -0400 (EDT) To: Christopher League , learn-at-nylxs.com From: Ruben Safir Message-ID: <58DD4211.2000508-at-panix.com> Date: Thu, 30 Mar 2017 13:36:17 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 Subject: [Learn] random weights X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
102 void randomize(perceptron& p) 103 { 104 const int scale =3D 2; 105 for(unsigned i =3D 0; i < p.weights.size(); i++) { 106 =C2=A6p.weights[i] =3D ((((float)rand()) / RAND_MAX) * scale * 2) - = scale; 107 } 108 }
I just don't get this. What is scale. Why multiply by 2? _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|