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 4C9D3200BF0 for ; Fri, 16 Dec 2016 06:13:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4A670160B2D; Fri, 16 Dec 2016 05:13:44 +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 9453E160B15 for ; Fri, 16 Dec 2016 06:13:43 +0100 (CET) Received: (qmail 49899 invoked by uid 500); 16 Dec 2016 05:13:42 -0000 Mailing-List: contact commits-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 commits@singa.incubator.apache.org Received: (qmail 49886 invoked by uid 99); 16 Dec 2016 05:13:42 -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; Fri, 16 Dec 2016 05:13:42 +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 60C77183973 for ; Fri, 16 Dec 2016 05:13:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id kRAvQHLKQTZk for ; Fri, 16 Dec 2016 05:13:41 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 352BC5F4E7 for ; Fri, 16 Dec 2016 05:13:41 +0000 (UTC) Received: (qmail 49873 invoked by uid 99); 16 Dec 2016 05:13:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2016 05:13:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9B13EE3908; Fri, 16 Dec 2016 05:13:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wangwei@apache.org To: commits@singa.incubator.apache.org Message-Id: <9f7214fb3cb74ee2a6652255e7bfebe7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-singa git commit: SINGA-282 Add grayscale to load method in ImageTool class Date: Fri, 16 Dec 2016 05:13:40 +0000 (UTC) archived-at: Fri, 16 Dec 2016 05:13:44 -0000 Repository: incubator-singa Updated Branches: refs/heads/master 82c12c2b9 -> a43f2912b SINGA-282 Add grayscale to load method in ImageTool class Add parameter "grayscale" to load method in image_tool.ImageTool. Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/a43f2912 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/a43f2912 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/a43f2912 Branch: refs/heads/master Commit: a43f2912b875b86b2afc026d1a4353d14b945786 Parents: 82c12c2 Author: Xiangrui Authored: Fri Dec 16 12:25:20 2016 +0800 Committer: Xiangrui Committed: Fri Dec 16 12:25:20 2016 +0800 ---------------------------------------------------------------------- python/singa/image_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a43f2912/python/singa/image_tool.py ---------------------------------------------------------------------- diff --git a/python/singa/image_tool.py b/python/singa/image_tool.py index 42fbf09..622c6f0 100644 --- a/python/singa/image_tool.py +++ b/python/singa/image_tool.py @@ -205,8 +205,8 @@ class ImageTool(): self.imgs = [] return - def load(self, path): - img = load_img(path) + def load(self, path, grayscale=False): + img = load_img(path, grayscale) self.imgs = [img] return self