From dev-return-5302-archive-asf-public=cust-asf.ponee.io@singa.apache.org Sat May 16 12:01:04 2020 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 91BC1180626 for ; Sat, 16 May 2020 14:01:04 +0200 (CEST) Received: (qmail 91816 invoked by uid 500); 16 May 2020 12:01:04 -0000 Mailing-List: contact dev-help@singa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.apache.org Delivered-To: mailing list dev@singa.apache.org Received: (qmail 91803 invoked by uid 99); 16 May 2020 12:01:04 -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; Sat, 16 May 2020 12:01:04 +0000 From: =?utf-8?q?GitBox?= To: dev@singa.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bsinga=5D_dcslin_edited_a_comment_on_issue_=23691?= =?utf-8?q?=3A_Add_save_and_load_method_for_Module_class?= Message-ID: <158963046390.19379.7137066781193309043.asfpy@gitbox.apache.org> Date: Sat, 16 May 2020 12:01:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: dcslin edited a comment on issue #691: URL: https://github.com/apache/singa/issues/691#issuecomment-629634540 From the perspective of a new onnx user: ```python class MySONNXModel(SONNXModel): pass m1=MySONNXModel() m1.compile([placeholder], ...) for _ in data: m1.train_one_batch(_) m1.save_states('./saved_models/my_sonnx_model_onnx_format') # transferable to other deeplearning framework singa.save('./saved_models/my_sonnx_model_singa_format') # only valid in singa # Later reuse the model onnx_model = onnx.load('./saved_models/my_sonnx_model_onnx_format') m2=MyONNXModel(onnx_model) m2.compile([x], use_graph=True) # m1 == m2? # load as singa model m3=singa.load('./saved_models/my_sonnx_model_singa_format') m3.compile([x], use_graph=True) # m1 == to_onnx(m3)? ``` To be frank, I am a bit overwhelmed by all the discussions not just in this issue, is it possible to consolidate the new API into a specification including example in singa-doc? Which is useful for new users? btw, is API in [onnx-doc](https://github.com/apache/singa-doc/blob/master/docs-site/docs/onnx.md) gonna change? ---------------------------------------------------------------- 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