Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B217C200B77 for ; Sat, 3 Sep 2016 14:05:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B02BB160ABB; Sat, 3 Sep 2016 12:05:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 045E1160AB9 for ; Sat, 3 Sep 2016 14:05:19 +0200 (CEST) Received: (qmail 31950 invoked by uid 500); 3 Sep 2016 12:05:19 -0000 Mailing-List: contact dev-help@horn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@horn.incubator.apache.org Delivered-To: mailing list dev@horn.incubator.apache.org Received: (qmail 31939 invoked by uid 99); 3 Sep 2016 12:05:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2016 12:05:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A05EB180623 for ; Sat, 3 Sep 2016 12:05:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.446 X-Spam-Level: X-Spam-Status: No, score=-5.446 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id H9YxPZZ0cmU8 for ; Sat, 3 Sep 2016 12:05:16 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 9B2D65FACA for ; Sat, 3 Sep 2016 12:05:15 +0000 (UTC) Received: (qmail 31507 invoked by uid 99); 3 Sep 2016 12:05:14 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2016 12:05:14 +0000 Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 526DA1A0112 for ; Sat, 3 Sep 2016 12:05:14 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id v143so67795334wmv.0 for ; Sat, 03 Sep 2016 05:05:14 -0700 (PDT) X-Gm-Message-State: AE9vXwOIDpnTuTs3ijUl/aylcajyuNSM4ROSybFIRqt3/NsO3884XEq7R1hrlVxJInMcpOhjP5We3Dhq7DZIQA== X-Received: by 10.194.179.163 with SMTP id dh3mr22741809wjc.73.1472904312883; Sat, 03 Sep 2016 05:05:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.225.87 with HTTP; Sat, 3 Sep 2016 05:05:12 -0700 (PDT) In-Reply-To: References: <01bd01d1ff32$764c3ad0$62e4b070$@samsung.com> From: "Edward J. Yoon" Date: Sat, 3 Sep 2016 21:05:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Use vector instead of Iterable in neuron API To: Apache Horn Dev Content-Type: text/plain; charset=UTF-8 archived-at: Sat, 03 Sep 2016 12:05:20 -0000 Interesting. Can you share your test code? On Sat, Sep 3, 2016 at 2:17 AM, Baran Topal wrote: > Hi Edward and team; > > I had a brief test by refactoring Iterable to Vector and on > TestNeuron.java, I can see some improved times. I didn't check for > other existing test methods but it seems the execution times are > improving for both forwarding and backwarding. > > These values are via System.currentTimeMillis(). > > E.g. > > > Execution time for the forward function is: 5722329 > Execution time for the backward function is: 31825 > > Execution time for the refactored forward function is: 72330 > Execution time for the refactored backward function is: 4665 > > Br. > > 2016-09-02 2:14 GMT+02:00 Yeonhee Lee : >> Hi Edward, >> >> If we don't have that kind of method in the neuron, I guess it's >> appropriate to put the method to the neuron. >> That can be one of the distinct features of Horn. >> >> Regards, >> Yeonhee >> >> >> 2016-08-26 9:40 GMT+09:00 Edward J. Yoon : >> >>> Hi forks, >>> >>> Our current neuron API is designed like: >>> https://github.com/apache/incubator-horn/blob/master/ >>> README.md#programming-m >>> odel >>> >>> In forward() method, each neuron receives the pairs of the inputs x1, x2, >>> ... xn from other neurons and weights w1, w2, ... wn like below: >>> >>> public void forward(Iterable messages) throws IOException; >>> >>> Instead of this, I suggest that we use just vector like below: >>> >>> /** >>> * @param input vector from other neurons >>> * / >>> public void forward(Vector input) throws IOException; >>> >>> And, the neuron provides a getWeightVector() method that returns weight >>> vector associated with itself. I think this is more make sense than current >>> version, and more easy to use GPU in the future. >>> >>> What do you think? >>> >>> Thanks. >>> >>> -- >>> Best Regards, Edward J. Yoon >>> >>> >>> >>> >>> -- Best Regards, Edward J. Yoon