From dev-return-2947-archive-asf-public=cust-asf.ponee.io@singa.incubator.apache.org Wed Jul 3 13:48:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id CEDF3180109 for ; Wed, 3 Jul 2019 15:48:01 +0200 (CEST) Received: (qmail 86913 invoked by uid 500); 3 Jul 2019 13:48:01 -0000 Mailing-List: contact dev-help@singa.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.incubator.apache.org Delivered-To: mailing list dev@singa.incubator.apache.org Received: (qmail 86898 invoked by uid 99); 3 Jul 2019 13:48:01 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2019 13:48:01 +0000 From: GitBox To: dev@singa.apache.org Subject: [GitHub] [incubator-singa] nudles commented on a change in pull request #475: SINGA-463 fixed python test_operation Message-ID: <156216168033.8230.4133728017049253624.gitbox@gitbox.apache.org> Date: Wed, 03 Jul 2019 13:48:00 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit nudles commented on a change in pull request #475: SINGA-463 fixed python test_operation URL: https://github.com/apache/incubator-singa/pull/475#discussion_r299965529 ########## File path: python/singa/autograd.py ########## @@ -924,17 +924,14 @@ def __init__( ) self.W.gaussian(0.0, std) - if self.bias: - b_shape = (self.out_channels,) - self.b = Tensor(shape=b_shape, requires_grad=True, stores_grad=True) - self.b.set_value(0.0) - else: - # to keep consistency when to do forward. - self.b = None - # Tensor(data=CTensor([]), requires_grad=False, stores_grad=False) + b_shape = (self.out_channels,) + # forward method required bias variable to proceed (dummy b tensor) + self.b = Tensor(shape=b_shape, requires_grad=self.bias, stores_grad=self.bias) Review comment: It also has some updates on batchnorm operation, https://github.com/apache/incubator-singa/pull/468/files#diff-a236c495700ad62b39e28a4ece74711fR1095 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services