From commits-return-34510-archive-asf-public=cust-asf.ponee.io@mxnet.incubator.apache.org Mon May 7 19:40:28 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 417A4180648 for ; Mon, 7 May 2018 19:40:28 +0200 (CEST) Received: (qmail 53414 invoked by uid 500); 7 May 2018 17:40:27 -0000 Mailing-List: contact commits-help@mxnet.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mxnet.incubator.apache.org Delivered-To: mailing list commits@mxnet.incubator.apache.org Received: (qmail 53405 invoked by uid 99); 7 May 2018 17:40:27 -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; Mon, 07 May 2018 17:40:27 +0000 From: GitBox To: commits@mxnet.apache.org Subject: [GitHub] spidyDev commented on a change in pull request #10726: Fix for cpp examples in mxnet/cpp-package. Message-ID: <152571482674.2001.9313637747137964115.gitbox@gitbox.apache.org> Date: Mon, 07 May 2018 17:40:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit spidyDev commented on a change in pull request #10726: Fix for cpp examples in mxnet/cpp-package. URL: https://github.com/apache/incubator-mxnet/pull/10726#discussion_r186493868 ########## File path: cpp-package/example/alexnet.cpp ########## @@ -306,19 +310,20 @@ int main(int argc, char const *argv[]) { LG << "ITER: " << iter << " Val LogLoss: " << logloss_val.Get(); /*save the parameters*/ - stringstream ss; - ss << iter; - string iter_str; - ss >> iter_str; - string save_path_param = "./model/alex_param_" + iter_str; - auto save_args = args_map; - /*we do not want to save the data and label*/ - save_args.erase(save_args.find("data")); - save_args.erase(save_args.find("label")); - /*the alexnet does not get any aux array, so we do not need to save - * aux_map*/ - LG << "ITER: " << iter << " Saving to..." << save_path_param; - NDArray::Save(save_path_param, save_args); + // Need to be fixed Review comment: yes, it was throwing error while saving when running on GPU. I was curious does NDArray::Save copies the GPU data to CPU before trying to save to CPU memory. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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