From patchwork Mon Jun 29 14:54:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Ting" X-Patchwork-Id: 20731 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:80ca:0:0:0:0:0 with SMTP id c10csp2876652ybm; Mon, 29 Jun 2020 08:01:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypY1vBViUZAgGHHk97V6Ns61MK2Slb32cLHSApy57SAI0eatZBEnW2wJ8CExxLiSARS8HU X-Received: by 2002:a1c:f003:: with SMTP id a3mr16747089wmb.119.1593442864100; Mon, 29 Jun 2020 08:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593442864; cv=none; d=google.com; s=arc-20160816; b=EtyF5ZFYyhFbCq1E4mHOaRGQQoeMY6y9Ixc72b/OvfoBStdl1cRAofxtviXR3Hm+u5 Tk/U9CQ4Hnqn0EuYoKMK5cUQpPA0DI2izy9biA5luUuEZ7HuOJOfTDyAfMxwZj95dVlJ UiNv1UsPYLRl96hoCQ65V6SGz9niIexX9yFhYXu36Ck7w9H3jKRFveU3C81/Dbs/tq7Z ysbPXPTD2i+EwkI+FPtEyC0y1bk9gWadL3N3xB7+3gK3kGTMQbsf7s0ayARZsHOnCsVx tMVeTZXzTCwNwKe8R7NOzHzgjLkH6fs72vHmyRuundVU3G8IFXB9ekothGljNJqAYBPU cnmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:ironport-sdr:ironport-sdr:delivered-to; bh=RkaNqi4LuhkAuaabJXrETV9Kx/pBcho1EP1Cl0TyxYo=; b=v911PNr6VSUB5VwCmIL6tgUEKlDNwEkpmHDrSopE95ZOQ3lPzknw6z9ozWNmry3xYV Vo29tu5M3XVix57ldnCks7VkgLk0xxViX+FCtoWLAGdL2+5di/bVlaM9m/p5+OquRa7F 5M3BaNZ+I6bfjJVUC0raeoxl1S1i9+OnX9twUD0rl5OhyGftjK/FegQtJubqyf6hoo+o b54S8clCf2LOoVHl5zR/3e2qhWuEfPEBesIuiB+028FR3F/AkQYVp7NOiejSn93Kvou3 3EZWZwFwzx7RuV6BDcqqGoucU+ZMBa3dXtOL7wHIulQU7AhXVI1rOhuLjUTzCjQHREdr Omqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d1si129168wrg.525.2020.06.29.08.01.03; Mon, 29 Jun 2020 08:01:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BC4A268AB72; Mon, 29 Jun 2020 18:00:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15227688077 for ; Mon, 29 Jun 2020 18:00:04 +0300 (EEST) IronPort-SDR: wpudzVOPlKpp/lJ7xea9RPsguS9OyhaJ9geaD0/F3dMYufadv9AKxHOEwgXG9CDxsLn7o1y/T5 9lGkvQCbrVUQ== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="144173136" X-IronPort-AV: E=Sophos;i="5.75,295,1589266800"; d="scan'208";a="144173136" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2020 07:59:58 -0700 IronPort-SDR: mDN0k0BtAiZDp7xenm9X2n/88NPvnY0SvBX6hdcSRS+ePGyTEwFkdKPO6DIyhd1l+93repzIWm ifYGzULZ6s6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,295,1589266800"; d="scan'208";a="313069759" Received: from semmer-ubuntu.sh.intel.com ([10.239.159.54]) by fmsmga002.fm.intel.com with ESMTP; 29 Jun 2020 07:59:57 -0700 From: Ting Fu To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Jun 2020 22:54:05 +0800 Message-Id: <20200629145411.24005-6-ting.fu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200629145411.24005-1-ting.fu@intel.com> References: <20200629145411.24005-1-ting.fu@intel.com> Subject: [FFmpeg-devel] [PATCH V2 06/12] dnn-layer-math-unary-test: add unit test for tanh X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qxPj5VBcA3U4 Content-Length: 1427 Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 0280debc0b..6885b4d318 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn-layer-mathunary-test.c @@ -48,6 +48,8 @@ static float get_expected(float f, DNNMathUnaryOperation op) return sinh(f); case DMUO_COSH: return cosh(f); + case DMUO_TANH: + return tanh(f); default: av_assert0(!"not supported yet"); return 0.f; @@ -109,5 +111,7 @@ int main(int agrc, char **argv) return 1; if (test(DMUO_COSH)) return 1; + if (test(DMUO_TANH)) + return 1; return 0; }