MESSAGE
DATE | 2017-03-29 |
FROM | Ruben Safir
|
SUBJECT | Subject: [Learn] This is hard to understand what the logic is here
|
From learn-bounces-at-nylxs.com Wed Mar 29 01:15:06 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 CEE71161312; Wed, 29 Mar 2017 01:15:05 -0400 (EDT) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62]) by mrbrklyn.com (Postfix) with ESMTP id B3F68160E77; Wed, 29 Mar 2017 01:15:02 -0400 (EDT) To: Christopher League , "learn-at-nylxs.com" From: Ruben Safir Message-ID: Date: Wed, 29 Mar 2017 01:15:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Subject: [Learn] This is hard to understand what the logic is here 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
float feed_forward(const perceptron& p, vector& input) { // If input size doesn't match, add "bias" inputs: while(input.size() < p.weights.size()) { input.push_back(1); } return step_function(p.threshold, dot_product(p.weights, input)); }
step_function should return an INT
What is the logic to this? Don't you always need the bias?
https://gitlab.liu.edu/cs691s17/public/raw/1dd68b2f00b96db17a988242221f50e4eab7ddbb/perceptrons/perceptrons.cpp
-- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|