From dev-return-5196-archive-asf-public=cust-asf.ponee.io@singa.apache.org Mon May 4 06:56:05 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 1E665180665 for ; Mon, 4 May 2020 08:56:05 +0200 (CEST) Received: (qmail 90101 invoked by uid 500); 4 May 2020 06:56: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 90081 invoked by uid 99); 4 May 2020 06:56:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2020 06:56:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EED25C00CE for ; Mon, 4 May 2020 06:56:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -112.991 X-Spam-Level: X-Spam-Status: No, score=-112.991 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_DMARC_STATUS=0.01, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id glocVEUFu2dT for ; Mon, 4 May 2020 06:56:02 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=207.244.88.153; helo=mail.apache.org; envelope-from=jira@apache.org; receiver= Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with SMTP id ECFB07DC64 for ; Mon, 4 May 2020 06:56:01 +0000 (UTC) Received: (qmail 89959 invoked by uid 99); 4 May 2020 06:56:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2020 06:56:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9E4B9E2569 for ; Mon, 4 May 2020 06:56:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 19DEA7802C3 for ; Mon, 4 May 2020 06:56:00 +0000 (UTC) Date: Mon, 4 May 2020 06:56:00 +0000 (UTC) From: "zhangzhaoqi (Jira)" To: dev@singa.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (SINGA-506) add autograd operators for NLP models MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SINGA-506?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] zhangzhaoqi resolved SINGA-506. ------------------------------- Resolution: Implemented > add autograd operators for NLP models > ------------------------------------- > > Key: SINGA-506 > URL: https://issues.apache.org/jira/browse/SINGA-506 > Project: Singa > Issue Type: New Feature > Reporter: zhangzhaoqi > Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > *We are going to support these two NLP models, called, BERT-Squad and=C2= =A0GPT-2.* > *Totally, there are still 13 operators that we need to=C2=A0add=C2=A0as f= ollowing,* > =C2=A0 > *For details, these 13 operators belong to these three models separately= :* > |{color:#000000}*Operator*{color}|{color:#000000}*Rank*{color}|{color:#00= 0000}*Workload*{color}|{color:#000000}*Comments*{color}|{color:#000000}*BER= T-Squad*{color}|{color:#000000}*GPT-2*{color}| > |-{color:#000000}*Transpose*{color}-|{color:#000000}easy{color}|{color:#0= 00000}1h{color}|{color:#000000}Transpose the input tensor similar to numpy.= transpose. {color}|{color:#000000}T{color}|{color:#000000}T{color}| > |-{color:#000000}*ConstantOfShape*{color}-|{color:#000000}easy{color}|{co= lor:#000000}2h{color}|{color:#000000}Generate a tensor with given value and= shape.{color}|=C2=A0|{color:#000000}T{color}| > |-{color:#000000}*Shape*{color}-|{color:#000000}easy{color}|{color:#00000= 0}2h{color}|{color:#000000}Takes a tensor as input and outputs an 1D int64 = tensor containing the shape of the input tensor.{color}|{color:#000000}T{co= lor}|{color:#000000}T{color}| > |-{color:#000000}*Dropout*{color}-|{color:#000000}easy{color}|{color:#000= 000}3h{color}|{color:#000000}Dropout takes an input floating-point tensor a= nd an input ratio (floating-point scalar), and produces two tensor outputs,= output (floating-point tensor) and mask (Tensor). {color}|=C2=A0|=C2= =A0| > |-{color:#000000}*Ceil*{color}-|{color:#000000}easy{color}|{color:#000000= }4h{color}|{color:#000000}y =3D ceil(x){color}|=C2=A0|=C2=A0| > |-{color:#000000}*ReduceMean*{color}-|{color:#000000}easy{color}|{color:#= 000000}4h{color}|{color:#000000}Computes the mean of the input tensor's ele= ment along the provided axes.{color}|{color:#000000}T{color}|{color:#000000= }T{color}| > |-{color:#000000}*ReduceSum*{color}-|{color:#000000}easy{color}|{color:#0= 00000}4h{color}|{color:#000000}Computes the sum of the input tensor's eleme= nt along the provided axes.{color}|=C2=A0|=C2=A0| > |-{color:#000000}*Slice*{color}-|{color:#000000}easy{color}|{color:#00000= 0}4h{color}|{color:#000000}Produces a slice of the input tensor along multi= ple axes. {color}|{color:#000000}T{color}|{color:#000000}T{color}| > |-{color:#000000}*NonZero*{color}-|{color:#000000}easy{color}|{color:#000= 000}12h{color}|{color:#000000}Returns the indices of the elements that are = non-zero (in row-major order - by dimension).{color}|=C2=A0|{color:#000000}= T{color}| > |-{color:#000000}*Split*{color}-|{color:#000000}easy{color}|{color:#00000= 0}12h{color}|{color:#000000}Split a tensor into a list of tensors, along th= e specified 'axis'.{color}|{color:#000000}T{color}|{color:#000000}T{color}| > |-{color:#000000}*Tile*{color}-|{color:#000000}easy{color}|{color:#000000= }1d{color}|{color:#000000}Constructs a tensor by tiling a given tensor. Thi= s is the same as function tile in Numpy, but no broadcast. For example A = =3D [[1, 2], [3, 4]], B =3D [1, 2], tile(A, B) =3D [[1, 2, 1, 2], [3, 4, 3,= 4]]{color}|{color:#000000}T{color}|=C2=A0| > |-{color:#000000}*Gather*{color}-|{color:#000000}complicated{color}|{colo= r:#000000}3d{color}|{color:#000000}Given data tensor of rank r >=3D 1, and = indices tensor of rank q, gather entries of the axis dimension of data (by = default outer-most one as axis=3D0) indexed by indices, and concatenates th= em{color}|{color:#000000}T{color}|{color:#000000}T{color}| > |-{color:#000000}*Cast*{color}-|{color:#000000}hard{color}|{color:#000000= }-{color}|{color:#000000}The operator casts the elements of a given input t= ensor to a data type specified by the 'to' argument and returns an output t= ensor of the same size in the converted type.{color}|{color:#000000}T{color= }|{color:#000000}T{color}| > *BERT-Squad:* > Slice > Shape > Gather > ReduceMean > Cast > Tile > Transpose > Split > *GPT-2:* > ConstantOfShape > Slice > Shape > Gather > ReduceMean > NonZero > Cast > Transpose > Split > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)