summaryrefslogtreecommitdiff
path: root/docs/NN/html/group__FC.html
diff options
context:
space:
mode:
authorAli Labbene <ali.labbene@st.com>2019-12-11 08:59:21 +0100
committerAli Labbene <ali.labbene@st.com>2019-12-16 16:35:24 +0100
commit9f95ff5b6ba01db09552b84a0ab79607060a2666 (patch)
tree8a6e0dda832555c692307869aed49d07ee7facfe /docs/NN/html/group__FC.html
parent76177aa280494bb36d7a0bcbda1078d4db717020 (diff)
downloadst-cmsis-core-lowfat-9f95ff5b6ba01db09552b84a0ab79607060a2666.tar.gz
st-cmsis-core-lowfat-9f95ff5b6ba01db09552b84a0ab79607060a2666.tar.bz2
st-cmsis-core-lowfat-9f95ff5b6ba01db09552b84a0ab79607060a2666.zip
Official ARM version: v5.4.0
Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3
Diffstat (limited to 'docs/NN/html/group__FC.html')
-rw-r--r--docs/NN/html/group__FC.html755
1 files changed, 755 insertions, 0 deletions
diff --git a/docs/NN/html/group__FC.html b/docs/NN/html/group__FC.html
new file mode 100644
index 0000000..659cf6d
--- /dev/null
+++ b/docs/NN/html/group__FC.html
@@ -0,0 +1,755 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<title>Fully-connected Layer Functions</title>
+<title>CMSIS-NN: Fully-connected Layer Functions</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="cmsis.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<script type="text/javascript" src="printComponentTabs.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+ $(document).ready(initResizable);
+ $(window).load(resizeHeight);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() { searchBox.OnSelectItem(0); });
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 46px;">
+ <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">CMSIS-NN
+ &#160;<span id="projectnumber">Version 1.1.0</span>
+ </div>
+ <div id="projectbrief">CMSIS NN Software Library</div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<div id="CMSISnav" class="tabs1">
+ <ul class="tablist">
+ <script type="text/javascript">
+ <!--
+ writeComponentTabs.call(this);
+ //-->
+ </script>
+ </ul>
+</div>
+<!-- Generated by Doxygen 1.8.6 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
+ <li><a href="modules.html"><span>Reference</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <span class="left">
+ <img id="MSearchSelect" src="search/mag_sel.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ </span><span class="right">
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+ <div id="nav-tree">
+ <div id="nav-tree-contents">
+ <div id="nav-sync" class="sync"></div>
+ </div>
+ </div>
+ <div id="splitbar" style="-moz-user-select:none;"
+ class="ui-resizable-handle">
+ </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('group__FC.html','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">Fully-connected Layer Functions<div class="ingroups"><a class="el" href="group__groupNN.html">Neural Network Functions</a></div></div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga4a1521e7532a1e62d71f3b12762016e2"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga4a1521e7532a1e62d71f3b12762016e2">arm_fully_connected_mat_q7_vec_q15</a> (const q15_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:ga4a1521e7532a1e62d71f3b12762016e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixed Q15-Q7 fully-connected layer function. <a href="#ga4a1521e7532a1e62d71f3b12762016e2">More...</a><br/></td></tr>
+<tr class="separator:ga4a1521e7532a1e62d71f3b12762016e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae3857bb6375692e81dde8cbd70adec08"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gae3857bb6375692e81dde8cbd70adec08">arm_fully_connected_mat_q7_vec_q15_opt</a> (const q15_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:gae3857bb6375692e81dde8cbd70adec08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixed Q15-Q7 opt fully-connected layer function. <a href="#gae3857bb6375692e81dde8cbd70adec08">More...</a><br/></td></tr>
+<tr class="separator:gae3857bb6375692e81dde8cbd70adec08"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaac666c212b209e636c2369dd5c75d0dc"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gaac666c212b209e636c2369dd5c75d0dc">arm_fully_connected_q15</a> (const q15_t *pV, const q15_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q15_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:gaac666c212b209e636c2369dd5c75d0dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 opt fully-connected layer function. <a href="#gaac666c212b209e636c2369dd5c75d0dc">More...</a><br/></td></tr>
+<tr class="separator:gaac666c212b209e636c2369dd5c75d0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga062912078da113f5dd2004fd919a0ff2"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga062912078da113f5dd2004fd919a0ff2">arm_fully_connected_q15_opt</a> (const q15_t *pV, const q15_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q15_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:ga062912078da113f5dd2004fd919a0ff2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 opt fully-connected layer function. <a href="#ga062912078da113f5dd2004fd919a0ff2">More...</a><br/></td></tr>
+<tr class="separator:ga062912078da113f5dd2004fd919a0ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga8b7e0c2e989e8c75f0dc789f3115323d">arm_fully_connected_q7</a> (const q7_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q7_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 basic fully-connected layer function. <a href="#ga8b7e0c2e989e8c75f0dc789f3115323d">More...</a><br/></td></tr>
+<tr class="separator:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gaf82b71ef472a38f8fc9ac414d9d07e67">arm_fully_connected_q7_opt</a> (const q7_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q7_t *pOut, q15_t *vec_buffer)</td></tr>
+<tr class="memdesc:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 opt fully-connected layer function. <a href="#gaf82b71ef472a38f8fc9ac414d9d07e67">More...</a><br/></td></tr>
+<tr class="separator:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
+<p>Perform fully-connected layer</p>
+<p>Fully-connected layer is basically a matrix-vector multiplication with bias. The matrix is the weights and the input/output vectors are the activation values. Supported {weight, activation} precisions include {8-bit, 8-bit}, {16-bit, 16-bit}, and {8-bit, 16-bit}.</p>
+<p>Here we have two types of kernel functions. The basic function implements the function using regular GEMV approach. The opt functions operates with weights in interleaved formats. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="ga4a1521e7532a1e62d71f3b12762016e2"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_mat_q7_vec_q15 </td>
+ <td>(</td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: 0</p>
+<p>Q7_Q15 version of the fully connected layer</p>
+<p>Weights are in q7_t and Activations are in q15_t </p>
+
+<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+<p>Referenced by <a class="el" href="arm__nnexamples__gru_8cpp.html#ac71a806472c7c0c284a2253e71a6a27b">gru_example()</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="gae3857bb6375692e81dde8cbd70adec08"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_mat_q7_vec_q15_opt </td>
+ <td>(</td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: 0</p>
+<p>Q7_Q15 version of the fully connected layer</p>
+<p>Weights are in q7_t and Activations are in q15_t</p>
+<p>Limitation: x4 version requires weight reordering to work</p>
+<p>Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix looks like this:</p>
+<p>| a11 | a12 | a13 | a14 | a15 | a16 | a17 |</p>
+<p>| a21 | a22 | a23 | a24 | a25 | a26 | a27 |</p>
+<p>| a31 | a32 | a33 | a34 | a35 | a36 | a37 |</p>
+<p>| a41 | a42 | a43 | a44 | a45 | a46 | a47 |</p>
+<p>| a51 | a52 | a53 | a54 | a55 | a56 | a57 |</p>
+<p>| a61 | a62 | a63 | a64 | a65 | a66 | a67 |</p>
+<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
+<p>| a11 | a21 | a12 | a22 | a31 | a41 | a32 | a42 |</p>
+<p>| a13 | a23 | a14 | a24 | a33 | a43 | a34 | a44 |</p>
+<p>| a15 | a25 | a16 | a26 | a35 | a45 | a36 | a46 |</p>
+<p>The column left over will be in-order. which is: | a17 | a27 | a37 | a47 |</p>
+<p>For the left-over rows, we do 1x1 computation, so the data remains as its original order.</p>
+<p>So the stored weight matrix looks like this:</p>
+<p>| a11 | a21 | a12 | a22 | a31 | a41 |</p>
+<p>| a32 | a42 | a13 | a23 | a14 | a24 |</p>
+<p>| a33 | a43 | a34 | a44 | a15 | a25 |</p>
+<p>| a16 | a26 | a35 | a45 | a36 | a46 |</p>
+<p>| a17 | a27 | a37 | a47 | a51 | a52 |</p>
+<p>| a53 | a54 | a55 | a56 | a57 | a61 |</p>
+<p>| a62 | a63 | a64 | a65 | a66 | a67 | </p>
+
+<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+<p>Referenced by <a class="el" href="arm__nnexamples__gru_8cpp.html#ac71a806472c7c0c284a2253e71a6a27b">gru_example()</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="gaac666c212b209e636c2369dd5c75d0dc"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_q15 </td>
+ <td>(</td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Q15 basic fully-connected layer function.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: 0 </p>
+
+<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ga062912078da113f5dd2004fd919a0ff2"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_q15_opt </td>
+ <td>(</td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q15_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: 0</p>
+<p>Here we use only one pointer to read 4 rows in the weight matrix. So if the original matrix looks like this:</p>
+<p>| a11 | a12 | a13 |</p>
+<p>| a21 | a22 | a23 |</p>
+<p>| a31 | a32 | a33 |</p>
+<p>| a41 | a42 | a43 |</p>
+<p>| a51 | a52 | a53 |</p>
+<p>| a61 | a62 | a63 |</p>
+<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
+<p>| a11 | a12 | a21 | a22 | a31 | a32 | a41 | a42 |</p>
+<p>| a13 | a23 | a33 | a43 |</p>
+<p>Remaining rows are kept the same original order.</p>
+<p>So the stored weight matrix looks like this:</p>
+<p>| a11 | a12 | a21 | a22 | a31 | a32 | a41 | a42 |</p>
+<p>| a13 | a23 | a33 | a43 | a51 | a52 | a53 | a61 |</p>
+<p>| a62 | a63 | </p>
+
+<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ga8b7e0c2e989e8c75f0dc789f3115323d"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_q7 </td>
+ <td>(</td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q7_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: dim_vec</p>
+<p>This basic function is designed to work with regular weight matrix without interleaving. </p>
+
+<p>References <a class="el" href="group__nndata__convert.html#gaba8fd446d5f54760b406ee63b25d1aee">arm_q7_to_q15_reordered_no_shift()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="gaf82b71ef472a38f8fc9ac414d9d07e67"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">arm_status arm_fully_connected_q7_opt </td>
+ <td>(</td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pV</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>pM</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>dim_vec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>num_of_rows</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>bias_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint16_t&#160;</td>
+ <td class="paramname"><em>out_shift</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const q7_t *&#160;</td>
+ <td class="paramname"><em>bias</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q7_t *&#160;</td>
+ <td class="paramname"><em>pOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">q15_t *&#160;</td>
+ <td class="paramname"><em>vec_buffer</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
+ <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
+<p><b>Buffer size:</b></p>
+<p>vec_buffer size: dim_vec</p>
+<p>This opt function is designed to work with interleaved weight matrix. The vector input is assumed in q7_t format, we call arm_q7_to_q15_no_shift_shuffle function to expand into q15_t format with certain weight re-ordering, refer to the function comments for more details. Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix looks like this:</p>
+<p>| a11 | a12 | a13 | a14 | a15 | a16 | a17 |</p>
+<p>| a21 | a22 | a23 | a24 | a25 | a26 | a27 |</p>
+<p>| a31 | a32 | a33 | a34 | a35 | a36 | a37 |</p>
+<p>| a41 | a42 | a43 | a44 | a45 | a46 | a47 |</p>
+<p>| a51 | a52 | a53 | a54 | a55 | a56 | a57 |</p>
+<p>| a61 | a62 | a63 | a64 | a65 | a66 | a67 |</p>
+<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
+<p>| a11 | a21 | a13 | a23 | a31 | a41 | a33 | a43 |</p>
+<p>| a12 | a22 | a14 | a24 | a32 | a42 | a34 | a44 |</p>
+<p>| a15 | a25 | a35 | a45 | a16 | a26 | a36 | a46 |</p>
+<p>So within the kernel, we first read the re-ordered vector in as:</p>
+<p>| b1 | b3 | and | b2 | b4 |</p>
+<p>the four q31_t weights will look like</p>
+<p>| a11 | a13 |, | a21 | a23 |, | a31 | a33 |, | a41 | a43 |</p>
+<p>| a12 | a14 |, | a22 | a24 |, | a32 | a34 |, | a42 | a44 |</p>
+<p>The column left over will be in-order. which is:</p>
+<p>| a17 | a27 | a37 | a47 |</p>
+<p>For the left-over rows, we do 1x1 computation, so the data remains as its original order.</p>
+<p>So the stored weight matrix looks like this:</p>
+<p>| a11 | a21 | a13 | a23 | a31 | a41 |</p>
+<p>| a33 | a43 | a12 | a22 | a14 | a24 |</p>
+<p>| a32 | a42 | a34 | a44 | a15 | a25 |</p>
+<p>| a35 | a45 | a16 | a26 | a36 | a46 |</p>
+<p>| a17 | a27 | a37 | a47 | a51 | a52 |</p>
+<p>| a53 | a54 | a55 | a56 | a57 | a61 |</p>
+<p>| a62 | a63 | a64 | a65 | a66 | a67 | </p>
+
+<p>References <a class="el" href="group__nndata__convert.html#gaba8fd446d5f54760b406ee63b25d1aee">arm_q7_to_q15_reordered_no_shift()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>
+
+<p>Referenced by <a class="el" href="arm__nnexamples__cifar10_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+ <ul>
+ <li class="footer">Generated on Wed Aug 1 2018 17:12:32 for CMSIS-NN by Arm Ltd. All rights reserved.
+ <!--
+ <a href="http://www.doxygen.org/index.html">
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
+ -->
+ </li>
+ </ul>
+</div>
+</body>
+</html>