api.html 155.4 KB
Newer Older
1 2


Y
Yu Yang 已提交
3 4 5 6 7 8 9 10
<!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/html; charset=utf-8" />
    
11
    <title>API &#8212; PaddlePaddle  documentation</title>
Y
Yu Yang 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    
    <link rel="stylesheet" href="../../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29 30
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
Y
Yu Yang 已提交
31 32 33 34
    <link rel="top" title="PaddlePaddle  documentation" href="../../index.html" />
    <link rel="up" title="Source Code Documents" href="../index.html" />
    <link rel="next" title="CustomStackTrace" href="../utils/customStackTrace.html" />
    <link rel="prev" title="Trainer" href="../trainer/trainer.html" /> 
35 36 37 38 39 40 41 42 43 44
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?b9a314ab40d04d805655aab1deee08ba";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

Y
Yu Yang 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../utils/customStackTrace.html" title="CustomStackTrace"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../trainer/trainer.html" title="Trainer"
             accesskey="P">previous</a> |</li>
62 63
        <li class="nav-item nav-item-0"><a href="../../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Source Code Documents</a> &#187;</li> 
Y
Yu Yang 已提交
64 65 66 67 68 69 70 71 72 73
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="api">
<h1>API<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
74
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
75 76 77 78 79 80 81
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.DISABLE_COPY_AND_ASSIGN">
<span class="target" id="paddlePaddleAPI_8h_1a76c34faf687dd7ab915b39c6eef73006"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span>classname<span class="sig-paren">)</span><a class="headerlink" href="#c.DISABLE_COPY_AND_ASSIGN" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
82
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
<p class="breathe-sectiondef-title rubric">Enums</p>
<dl class="type">
<dt id="_CPPv215SparseValueType">
<span id="SparseValueType"></span><span class="target" id="paddlePaddleAPI_8h_1addd5967b65599987fd7f5f2fb05d8262"></span><em class="property">enum </em><code class="descname">SparseValueType</code><a class="headerlink" href="#_CPPv215SparseValueType" title="Permalink to this definition"></a></dt>
<dd><p><em>Values:</em></p>
<dl class="member">
<dt id="_CPPv216SPARSE_NON_VALUE">
<span id="SPARSE_NON_VALUE"></span><span class="target" id="paddlePaddleAPI_8h_1addd5967b65599987fd7f5f2fb05d8262af0ce2797f93d05675e853c5b6e0a2715"></span><code class="descname">SPARSE_NON_VALUE</code> = 0<a class="headerlink" href="#_CPPv216SPARSE_NON_VALUE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv212SPARSE_VALUE">
<span id="SPARSE_VALUE"></span><span class="target" id="paddlePaddleAPI_8h_1addd5967b65599987fd7f5f2fb05d8262ac8e42af6d01d05e896e3f1eece65eaff"></span><code class="descname">SPARSE_VALUE</code> = 1<a class="headerlink" href="#_CPPv212SPARSE_VALUE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="type">
<dt id="_CPPv216SparseFormatType">
<span id="SparseFormatType"></span><span class="target" id="paddlePaddleAPI_8h_1a5d91c35bab6221cc467e7762d376385b"></span><em class="property">enum </em><code class="descname">SparseFormatType</code><a class="headerlink" href="#_CPPv216SparseFormatType" title="Permalink to this definition"></a></dt>
<dd><p><em>Values:</em></p>
<dl class="member">
<dt id="_CPPv210SPARSE_CSR">
<span id="SPARSE_CSR"></span><span class="target" id="paddlePaddleAPI_8h_1a5d91c35bab6221cc467e7762d376385ba3f1c9382754747ab5bea743076f4d92a"></span><code class="descname">SPARSE_CSR</code> = 0<a class="headerlink" href="#_CPPv210SPARSE_CSR" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv210SPARSE_CSC">
<span id="SPARSE_CSC"></span><span class="target" id="paddlePaddleAPI_8h_1a5d91c35bab6221cc467e7762d376385ba60de1f489d011cf6f0e220d7c94957d9"></span><code class="descname">SPARSE_CSC</code> = 1<a class="headerlink" href="#_CPPv210SPARSE_CSC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="type">
<dt id="_CPPv226GradientMatchineCreateMode">
<span id="GradientMatchineCreateMode"></span><span class="target" id="paddlePaddleAPI_8h_1a30f7ad426ac6f7b12a8c0dffe7372ad2"></span><em class="property">enum </em><code class="descname">GradientMatchineCreateMode</code><a class="headerlink" href="#_CPPv226GradientMatchineCreateMode" title="Permalink to this definition"></a></dt>
<dd><p><em>Values:</em></p>
<dl class="member">
<dt id="_CPPv218CREATE_MODE_NORMAL">
<span id="CREATE_MODE_NORMAL"></span><span class="target" id="paddlePaddleAPI_8h_1a30f7ad426ac6f7b12a8c0dffe7372ad2ae6fa46254dc3400f539836bcef4ace58"></span><code class="descname">CREATE_MODE_NORMAL</code> = 0<a class="headerlink" href="#_CPPv218CREATE_MODE_NORMAL" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv219CREATE_MODE_TESTING">
<span id="CREATE_MODE_TESTING"></span><span class="target" id="paddlePaddleAPI_8h_1a30f7ad426ac6f7b12a8c0dffe7372ad2a049aaa86c1c79480ef77657e576bd554"></span><code class="descname">CREATE_MODE_TESTING</code> = 4<a class="headerlink" href="#_CPPv219CREATE_MODE_TESTING" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</div>
133
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
134 135 136 137 138
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv210initPaddleiPPc">
<span id="initPaddle__i.cPP"></span><span class="target" id="paddlePaddleAPI_8h_1ac7f8b1e113d71dfa88d5133285ed3de9"></span>void <code class="descname">initPaddle</code><span class="sig-paren">(</span>int <em>argc</em>, char **<em>argv</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv210initPaddleiPPc" title="Permalink to this definition"></a></dt>
<dd><p>Initialize paddle. </p>
139
<p>In python, this method should be invoked as <div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
140 141 142
<span class="kn">import</span> <span class="nn">paddle</span>
<span class="n">paddle</span><span class="o">.</span><span class="n">initPaddle</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="ow">or</span> <span class="n">you</span> <span class="n">can</span> <span class="n">change</span> <span class="n">arguments</span> <span class="k">as</span> <span class="nb">any</span> <span class="nb">list</span> <span class="n">of</span> <span class="nb">str</span><span class="o">.</span>
Y
Yu Yang 已提交
143 144
</pre></div>
</div>
145
 </p>
Y
Yu Yang 已提交
146 147 148 149 150 151 152 153 154
</dd></dl>

<dl class="function">
<dt id="_CPPv212isGpuVersionv">
<span id="isGpuVersion"></span><span class="target" id="paddlePaddleAPI_8h_1ac538c31f62ed541e4df1768a89a6ae42"></span>bool <code class="descname">isGpuVersion</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv212isGpuVersionv" title="Permalink to this definition"></a></dt>
<dd><p>Return true if this py_paddle is compiled in GPU Version. </p>
</dd></dl>

</div>
155
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
<p class="breathe-sectiondef-title rubric">Variables</p>
<dl class="member">
<dt id="_CPPv212NO_SPARSE_ID">
<span id="NO_SPARSE_ID__sC"></span><span class="target" id="paddlePaddleAPI_8h_1a03fd2eaa4b14cae77f59206889f778f1"></span><em class="property">const</em> size_t <code class="descname">NO_SPARSE_ID</code><a class="headerlink" href="#_CPPv212NO_SPARSE_ID" title="Permalink to this definition"></a></dt>
<dd><p>In Python, -1UL is hard to write. So define a const value used by python side. </p>
</dd></dl>

</div>
<dl class="class">
<dt id="_CPPv27IOError">
<span id="IOError"></span><span class="target" id="paddleclassIOError"></span><em class="property">class </em><code class="descname">IOError</code><a class="headerlink" href="#_CPPv27IOError" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>The Error of IO Operation. Such as file not found, etc. </p>
</dd></dl>

<dl class="class">
<dt id="_CPPv210RangeError">
<span id="RangeError"></span><span class="target" id="paddleclassRangeError"></span><em class="property">class </em><code class="descname">RangeError</code><a class="headerlink" href="#_CPPv210RangeError" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>Out of range error. </p>
</dd></dl>

<dl class="class">
<dt id="_CPPv214UnsupportError">
<span id="UnsupportError"></span><span class="target" id="paddleclassUnsupportError"></span><em class="property">class </em><code class="descname">UnsupportError</code><a class="headerlink" href="#_CPPv214UnsupportError" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>Not support Error, such as access GPU memory directly, etc. </p>
</dd></dl>

<dl class="class">
<dt id="_CPPv210FloatArray">
<span id="FloatArray"></span><span class="target" id="paddlestructFloatArray"></span><em class="property">struct </em><code class="descname">FloatArray</code><a class="headerlink" href="#_CPPv210FloatArray" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>This type will map to python&#8217;s list of float. </p>
186
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
187 188 189 190 191 192 193
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N10FloatArray10FloatArrayEPKfK6size_t">
<span id="FloatArray::FloatArray__floatCP.sC"></span><span class="target" id="paddlestructFloatArray_1a3b2d7c2b75a0fba691253b18763fd3ea"></span><code class="descname">FloatArray</code><span class="sig-paren">(</span><em class="property">const</em> float *<em>b</em>, <em class="property">const</em> size_t <em>l</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N10FloatArray10FloatArrayEPKfK6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
194
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N10FloatArray3bufE">
<span id="FloatArray::buf__floatCP"></span><span class="target" id="paddlestructFloatArray_1a555466bd623bbfd8f8aa086c80ba905a"></span><em class="property">const</em> float *<code class="descname">buf</code><a class="headerlink" href="#_CPPv2N10FloatArray3bufE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N10FloatArray6lengthE">
<span id="FloatArray::length__sC"></span><span class="target" id="paddlestructFloatArray_1aa6e8e4898d969b6e2db18dda644d65a8"></span><em class="property">const</em> size_t <code class="descname">length</code><a class="headerlink" href="#_CPPv2N10FloatArray6lengthE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N10FloatArray8needFreeE">
<span id="FloatArray::needFree__b"></span><span class="target" id="paddlestructFloatArray_1ade47728a38cdd4634f7a9ddd5430ab1c"></span>bool <code class="descname">needFree</code><a class="headerlink" href="#_CPPv2N10FloatArray8needFreeE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv28IntArray">
<span id="IntArray"></span><span class="target" id="paddlestructIntArray"></span><em class="property">struct </em><code class="descname">IntArray</code><a class="headerlink" href="#_CPPv28IntArray" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>This type will map to python&#8217;s list of int. </p>
218
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
219 220 221 222 223 224 225
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N8IntArray8IntArrayEPKiK6size_tb">
<span id="IntArray::IntArray__iCP.sC.b"></span><span class="target" id="paddlestructIntArray_1a453a19f9d0e7c30be994a1ac68748f46"></span><code class="descname">IntArray</code><span class="sig-paren">(</span><em class="property">const</em> int *<em>b</em>, <em class="property">const</em> size_t <em>l</em>, bool <em>f</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N8IntArray8IntArrayEPKiK6size_tb" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
226
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N8IntArray3bufE">
<span id="IntArray::buf__iCP"></span><span class="target" id="paddlestructIntArray_1a3982a968ea9b0413cde5bf44343bd26d"></span><em class="property">const</em> int *<code class="descname">buf</code><a class="headerlink" href="#_CPPv2N8IntArray3bufE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N8IntArray6lengthE">
<span id="IntArray::length__sC"></span><span class="target" id="paddlestructIntArray_1a3b9ad8361e8ea743e343c0b4af5b8b23"></span><em class="property">const</em> size_t <code class="descname">length</code><a class="headerlink" href="#_CPPv2N8IntArray6lengthE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N8IntArray8needFreeE">
<span id="IntArray::needFree__b"></span><span class="target" id="paddlestructIntArray_1a729cb754d74136bc8fb5be94e044688b"></span>bool <code class="descname">needFree</code><a class="headerlink" href="#_CPPv2N8IntArray8needFreeE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv217IntWithFloatArray">
<span id="IntWithFloatArray"></span><span class="target" id="paddlestructIntWithFloatArray"></span><em class="property">struct </em><code class="descname">IntWithFloatArray</code><a class="headerlink" href="#_CPPv217IntWithFloatArray" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>This type will map to python&#8217;s list of (int, float) </p>
250
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
251 252 253 254 255 256 257
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N17IntWithFloatArray17IntWithFloatArrayEPKfPKi6size_tb">
<span id="IntWithFloatArray::IntWithFloatArray__floatCP.iCP.s.b"></span><span class="target" id="paddlestructIntWithFloatArray_1a4a120e6528680743861aee5127593b31"></span><code class="descname">IntWithFloatArray</code><span class="sig-paren">(</span><em class="property">const</em> float *<em>v</em>, <em class="property">const</em> int *<em>i</em>, size_t <em>l</em>, bool <em>f</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17IntWithFloatArray17IntWithFloatArrayEPKfPKi6size_tb" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
258
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N17IntWithFloatArray6valBufE">
<span id="IntWithFloatArray::valBuf__floatCP"></span><span class="target" id="paddlestructIntWithFloatArray_1aa4fc13f0490245a17d661255a649bb1d"></span><em class="property">const</em> float *<code class="descname">valBuf</code><a class="headerlink" href="#_CPPv2N17IntWithFloatArray6valBufE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N17IntWithFloatArray6idxBufE">
<span id="IntWithFloatArray::idxBuf__iCP"></span><span class="target" id="paddlestructIntWithFloatArray_1a4470f5292359d092268ed61ee9038b2e"></span><em class="property">const</em> int *<code class="descname">idxBuf</code><a class="headerlink" href="#_CPPv2N17IntWithFloatArray6idxBufE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N17IntWithFloatArray6lengthE">
<span id="IntWithFloatArray::length__sC"></span><span class="target" id="paddlestructIntWithFloatArray_1aa26b8fb9b8092bbb5f4dc9070383c388"></span><em class="property">const</em> size_t <code class="descname">length</code><a class="headerlink" href="#_CPPv2N17IntWithFloatArray6lengthE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N17IntWithFloatArray8needFreeE">
<span id="IntWithFloatArray::needFree__b"></span><span class="target" id="paddlestructIntWithFloatArray_1abd1d6289f62b2b2bf70777a356e5bd3c"></span>bool <code class="descname">needFree</code><a class="headerlink" href="#_CPPv2N17IntWithFloatArray8needFreeE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv26Matrix">
<span id="Matrix"></span><span class="target" id="paddleclassMatrix"></span><em class="property">class </em><code class="descname">Matrix</code><a class="headerlink" href="#_CPPv26Matrix" title="Permalink to this definition"></a></dt>
286
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
287 288 289
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6MatrixD0Ev">
290
<span id="Matrix::~Matrix"></span><span class="target" id="paddleclassMatrix_1a9b1c3627f573d78a2f08623fdfef990f"></span><code class="descname">~Matrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6MatrixD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
291 292 293 294 295 296 297
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix17toNumpyMatInplaceEPPfPiPi">
<span id="Matrix::toNumpyMatInplace__floatPP.iP.iP"></span><span class="target" id="paddleclassMatrix_1ab0508be720fe746db39144e20b61183d"></span>void <code class="descname">toNumpyMatInplace</code><span class="sig-paren">(</span>float **<em>view_data</em>, int *<em>dim1</em>, int *<em>dim2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix17toNumpyMatInplaceEPPfPiPi" title="Permalink to this definition"></a></dt>
<dd><p>Cast to numpy matrix.</p>
<p>
298
Example: <div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">paddle</span>
Y
Yu Yang 已提交
299 300 301 302
<span class="n">m</span> <span class="o">=</span> <span class="n">paddle</span><span class="o">.</span><span class="n">Matrix</span><span class="o">.</span><span class="n">createZero</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span>
<span class="n">numpy_mat</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">toNumpyMat</span><span class="p">()</span>
</pre></div>
</div>
303
 <dl class="docutils">
Y
Yu Yang 已提交
304
<dt><strong>Note</strong></dt>
305 306 307 308
<dd><p class="first">This method take no parameter in python. </p>
<p>This method in python will return a numpy matrix, not void. </p>
<p class="last">Only CpuDenseMatrix is supported.</p>
</dd>
Y
Yu Yang 已提交
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix14copyToNumpyMatEPPfPiPi">
<span id="Matrix::copyToNumpyMat__floatPP.iP.iP"></span><span class="target" id="paddleclassMatrix_1a60d98fcd0d992698f7987cac9bf436ce"></span>void <code class="descname">copyToNumpyMat</code><span class="sig-paren">(</span>float **<em>view_m_data</em>, int *<em>dim1</em>, int *<em>dim2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix14copyToNumpyMatEPPfPiPi" title="Permalink to this definition"></a></dt>
<dd><p>Copy To numpy mat. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix16copyFromNumpyMatEPfii">
<span id="Matrix::copyFromNumpyMat__floatP.i.i"></span><span class="target" id="paddleclassMatrix_1a1dcf45894da4d0da90a6383cc57d63ed"></span>void <code class="descname">copyFromNumpyMat</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim1</em>, int <em>dim2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix16copyFromNumpyMatEPfii" title="Permalink to this definition"></a></dt>
<dd><p>Copy From Numpy Mat. </p>
</dd></dl>

<dl class="function">
326 327
<dt id="_CPPv2NK6Matrix8isSparseEv">
<span id="Matrix::isSparseC"></span><span class="target" id="paddleclassMatrix_1a7f9692852624f9c90af72cc5cf69b125"></span>bool <code class="descname">isSparse</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix8isSparseEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
328 329 330 331
<dd><p>return true if this matrix is sparse. </p>
</dd></dl>

<dl class="function">
332 333
<dt id="_CPPv2NK6Matrix18getSparseValueTypeEv">
<span id="Matrix::getSparseValueTypeC"></span><span class="target" id="paddleclassMatrix_1a4f354b0b61332a319b2971e96a511b92"></span><a class="reference internal" href="#_CPPv215SparseValueType" title="SparseValueType">SparseValueType</a> <code class="descname">getSparseValueType</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix18getSparseValueTypeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
334 335 336
<dd></dd></dl>

<dl class="function">
337 338
<dt id="_CPPv2NK6Matrix15getSparseFormatEv">
<span id="Matrix::getSparseFormatC"></span><span class="target" id="paddleclassMatrix_1a7879a0440a018f477a6525291dd93d01"></span><a class="reference internal" href="#_CPPv216SparseFormatType" title="SparseFormatType">SparseFormatType</a> <code class="descname">getSparseFormat</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix15getSparseFormatEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
339 340 341
<dd></dd></dl>

<dl class="function">
342 343
<dt id="_CPPv2NK6Matrix16getSparseRowColsE6size_t">
<span id="Matrix::getSparseRowCols__sC"></span><span class="target" id="paddleclassMatrix_1ab18c99db6c43233223b6a939bbfc084d"></span><a class="reference internal" href="#_CPPv28IntArray" title="IntArray">IntArray</a> <code class="descname">getSparseRowCols</code><span class="sig-paren">(</span>size_t <em>i</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix16getSparseRowColsE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
344 345 346
<dd></dd></dl>

<dl class="function">
347 348
<dt id="_CPPv2NK6Matrix19getSparseRowColsValE6size_t">
<span id="Matrix::getSparseRowColsVal__sC"></span><span class="target" id="paddleclassMatrix_1af67456ef494936ae15d2f7815fe05cab"></span><a class="reference internal" href="#_CPPv217IntWithFloatArray" title="IntWithFloatArray">IntWithFloatArray</a> <code class="descname">getSparseRowColsVal</code><span class="sig-paren">(</span>size_t <em>i</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix19getSparseRowColsValE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
349 350 351
<dd></dd></dl>

<dl class="function">
352 353
<dt id="_CPPv2NK6Matrix9getHeightEv">
<span id="Matrix::getHeightC"></span><span class="target" id="paddleclassMatrix_1a660b355a32fc0f6a3805509c640042b9"></span>size_t <code class="descname">getHeight</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix9getHeightEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
354 355 356
<dd></dd></dl>

<dl class="function">
357 358
<dt id="_CPPv2NK6Matrix8getWidthEv">
<span id="Matrix::getWidthC"></span><span class="target" id="paddleclassMatrix_1a0f7f53e3d6894dc72f931779f20a54a7"></span>size_t <code class="descname">getWidth</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix8getWidthEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
359 360 361
<dd></dd></dl>

<dl class="function">
362 363
<dt id="_CPPv2NK6Matrix3getE6size_t6size_t">
<span id="Matrix::get__s.sC"></span><span class="target" id="paddleclassMatrix_1a33a23d5e81143847edbced9375b4b25f"></span>float <code class="descname">get</code><span class="sig-paren">(</span>size_t <em>x</em>, size_t <em>y</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix3getE6size_t6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
364 365 366 367 368 369 370 371
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix3setE6size_t6size_tf">
<span id="Matrix::set__s.s.float"></span><span class="target" id="paddleclassMatrix_1a10a1c3db62d980b68b8d4cedfc15549d"></span>void <code class="descname">set</code><span class="sig-paren">(</span>size_t <em>x</em>, size_t <em>y</em>, float <em>val</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix3setE6size_t6size_tf" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
372 373
<dt id="_CPPv2NK6Matrix7getDataEv">
<span id="Matrix::getDataC"></span><span class="target" id="paddleclassMatrix_1a8ed4c472b21254c9c96a2f353b701e89"></span><a class="reference internal" href="#_CPPv210FloatArray" title="FloatArray">FloatArray</a> <code class="descname">getData</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix7getDataEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
374 375 376 377 378 379 380 381 382 383 384
<dd><p>return type is list of float </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix14sparseCopyFromERKNSt6vectorIiEERKNSt6vectorIiEERKNSt6vectorIfEE">
<span id="Matrix::sparseCopyFrom__std::vector:i:CR.std::vector:i:CR.std::vector:float:CR"></span><span class="target" id="paddleclassMatrix_1a9281778d22eb64090943e7afa9db519e"></span>void <code class="descname">sparseCopyFrom</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;int&gt; &amp;<em>rows</em>, <em class="property">const</em> std::vector&lt;int&gt; &amp;<em>cols</em>, <em class="property">const</em> std::vector&lt;float&gt; &amp;<em>values</em> = std::vector&lt; float &gt;()<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix14sparseCopyFromERKNSt6vectorIiEERKNSt6vectorIiEERKNSt6vectorIfEE" title="Permalink to this definition"></a></dt>
<dd><p>Copy from rows, cols, values.</p>
<p>if sparse_nonvalue, the values should be [] </p>
</dd></dl>

<dl class="function">
385 386
<dt id="_CPPv2NK6Matrix5isGpuEv">
<span id="Matrix::isGpuC"></span><span class="target" id="paddleclassMatrix_1a9f9e590bd3bf74639e040793b097aa42"></span>bool <code class="descname">isGpu</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix5isGpuEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
387 388 389
<dd></dd></dl>

</div>
390
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
391 392 393
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N6Matrix10createZeroE6size_t6size_tb">
394 395
<span id="Matrix::createZero__s.s.b"></span><span class="target" id="paddleclassMatrix_1afba77a25fbc21cb19d5c8f4c5baec8ee"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createZero</code><span class="sig-paren">(</span>size_t <em>height</em>, size_t <em>width</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix10createZeroE6size_t6size_tb" title="Permalink to this definition"></a></dt>
<dd><p>Create A <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> with height,width, which is filled by zero. </p>
Y
Yu Yang 已提交
396 397 398 399
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix12createSparseE6size_t6size_t6size_tbbb">
400 401
<span id="Matrix::createSparse__s.s.s.b.b.b"></span><span class="target" id="paddleclassMatrix_1acf057b75ac2f0ac2cf6f7a47b874ec0c"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createSparse</code><span class="sig-paren">(</span>size_t <em>height</em>, size_t <em>width</em>, size_t <em>nnz</em>, bool <em>isNonVal</em> = true, bool <em>trans</em> = false, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix12createSparseE6size_t6size_t6size_tbbb" title="Permalink to this definition"></a></dt>
<dd><p>Create Sparse <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a>.</p>
Y
Yu Yang 已提交
402 403 404 405 406
<p>After create sparse, sparseCopyFrom can be used to fill matrix.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>the default sparse type is SPARSE_CSR. </dd>
<dt><strong>Parameters</strong></dt>
407 408
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">nnz</span></code>: Number of non zero values.</li>
Y
Yu Yang 已提交
409 410 411 412 413 414 415 416
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix11createDenseERKNSt6vectorIfEE6size_t6size_tb">
417 418
<span id="Matrix::createDense__std::vector:float:CR.s.s.b"></span><span class="target" id="paddleclassMatrix_1a1d45ac052cac4f2edb0feb219f7294fe"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createDense</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;float&gt; &amp;<em>data</em>, size_t <em>height</em>, size_t <em>width</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix11createDenseERKNSt6vectorIfEE6size_t6size_tb" title="Permalink to this definition"></a></dt>
<dd><p>Create Dense <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a>.</p>
Y
Yu Yang 已提交
419 420 421 422
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>the value will be copy into a new matrix. </dd>
<dt><strong>Parameters</strong></dt>
423 424
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: list of float should be passed in python. </li>
Y
Yu Yang 已提交
425 426 427 428 429 430 431 432
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix23createCpuDenseFromNumpyEPfiib">
433 434
<span id="Matrix::createCpuDenseFromNumpy__floatP.i.i.b"></span><span class="target" id="paddleclassMatrix_1af65d4fe9986121e5eed7aa3da0d654d7"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createCpuDenseFromNumpy</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim1</em>, int <em>dim2</em>, bool <em>copy</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix23createCpuDenseFromNumpyEPfiib" title="Permalink to this definition"></a></dt>
<dd><p>Create Cpu Dense <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> from numpy matrix, dtype=float32</p>
Y
Yu Yang 已提交
435 436
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
437 438 439 440 441
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: a numpy matrix. </li>
<li><code class="docutils literal"><span class="pre">dim1</span></code>: dimension of data. </li>
<li><code class="docutils literal"><span class="pre">dim2</span></code>: dimension of data. </li>
<li><code class="docutils literal"><span class="pre">copy</span></code>: true if copy into a new matrix, false will create matrix inplace. </li>
Y
Yu Yang 已提交
442 443 444 445 446 447 448 449
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix23createGpuDenseFromNumpyEPfii">
450 451
<span id="Matrix::createGpuDenseFromNumpy__floatP.i.i"></span><span class="target" id="paddleclassMatrix_1a16d874f6488ed932ec7eb06d786ba32f"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createGpuDenseFromNumpy</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim1</em>, int <em>dim2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix23createGpuDenseFromNumpyEPfii" title="Permalink to this definition"></a></dt>
<dd><p>Create Gpu Dense <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> from numpy matrix, dtype=float32. </p>
Y
Yu Yang 已提交
452 453 454
</dd></dl>

</div>
455
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
456 457 458 459 460 461 462 463
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N6Matrix6MatrixEv">
<span id="Matrix::Matrix"></span><span class="target" id="paddleclassMatrix_1a2dba13c45127354c9f75ef576f49269b"></span><code class="descname">Matrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix6MatrixEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Matrix23DISABLE_COPY_AND_ASSIGNE6Matrix">
464
<span id="Matrix::DISABLE_COPY_AND_ASSIGN__Matrix"></span><span class="target" id="paddleclassMatrix_1acaecf87b490aa3ccde53ca4fbf1e00e1"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix23DISABLE_COPY_AND_ASSIGNE6Matrix" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
465 466 467
<dd></dd></dl>

<dl class="function">
468 469
<dt id="_CPPv2NK6Matrix12getSharedPtrEv">
<span id="Matrix::getSharedPtrC"></span><span class="target" id="paddleclassMatrix_1a09e3b9de889fc418ce03f2e3d1a99736"></span>void *<code class="descname">getSharedPtr</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Matrix12getSharedPtrEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
470 471 472
<dd></dd></dl>

</div>
473
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
474 475 476 477 478 479 480
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N6Matrix1mE">
<span id="Matrix::m__MatrixPrivateP"></span><span class="target" id="paddleclassMatrix_1ad957a7db43b43cd1c13cb8f70e40d41f"></span>MatrixPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N6Matrix1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
481
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
482 483 484
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N6Matrix23createByPaddleMatrixPtrEPv">
485
<span id="Matrix::createByPaddleMatrixPtr__voidP"></span><span class="target" id="paddleclassMatrix_1a12f399b64a77b777d4a7d5e2feff090f"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">createByPaddleMatrixPtr</code><span class="sig-paren">(</span>void *<em>sharedPtr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Matrix23createByPaddleMatrixPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
486 487 488
<dd></dd></dl>

</div>
489
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassMatrix_1ad38c9566742be31ca860cf8b5d6ae11f"></span><em class="property">friend </em><code class="descname">Trainer</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassMatrix_1ab1e2416f07bda51a0f8da259ba54746d"></span><em class="property">friend </em><code class="descname">GradientMachine</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassMatrix_1acbd2a21b98cd2cb694fd02340724b625"></span><em class="property">friend </em><code class="descname">Arguments</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv26Vector">
<span id="Vector"></span><span class="target" id="paddleclassVector"></span><em class="property">class </em><code class="descname">Vector</code><a class="headerlink" href="#_CPPv26Vector" title="Permalink to this definition"></a></dt>
512
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6VectorD0Ev">
<span id="Vector::~Vector"></span><span class="target" id="paddleclassVector_1a2eb3c49587a4f12cade7895ccb73f6a0"></span><code class="descname">~Vector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6VectorD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector19toNumpyArrayInplaceEPPfPi">
<span id="Vector::toNumpyArrayInplace__floatPP.iP"></span><span class="target" id="paddleclassVector_1a8408d4081689ef33da1aeaf6d9dd1eb2"></span>void <code class="descname">toNumpyArrayInplace</code><span class="sig-paren">(</span>float **<em>view_data</em>, int *<em>dim1</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector19toNumpyArrayInplaceEPPfPi" title="Permalink to this definition"></a></dt>
<dd><p>Cast to numpy array inplace. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector16copyToNumpyArrayEPPfPi">
<span id="Vector::copyToNumpyArray__floatPP.iP"></span><span class="target" id="paddleclassVector_1ac04b0709b2a9a6a8b700b5fe714edca2"></span>void <code class="descname">copyToNumpyArray</code><span class="sig-paren">(</span>float **<em>view_m_data</em>, int *<em>dim1</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector16copyToNumpyArrayEPPfPi" title="Permalink to this definition"></a></dt>
<dd><p>Copy to numpy array. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector18copyFromNumpyArrayEPfi">
<span id="Vector::copyFromNumpyArray__floatP.i"></span><span class="target" id="paddleclassVector_1a0eba34c05713452e4c63a01cd92e0604"></span>void <code class="descname">copyFromNumpyArray</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector18copyFromNumpyArrayEPfi" title="Permalink to this definition"></a></dt>
<dd><p>Copy from numpy array. </p>
</dd></dl>

<dl class="function">
538 539
<dt id="_CPPv2NK6Vector3getEK6size_t">
<span id="Vector::get__sCC"></span><span class="target" id="paddleclassVector_1ac062b1253e347d41b4e50cd44b19f5f1"></span>float <code class="descname">get</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Vector3getEK6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
540 541 542 543 544 545 546 547 548 549
<dd><p><strong>getitem</strong> in python </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector3setEK6size_tf">
<span id="Vector::set__sC.float"></span><span class="target" id="paddleclassVector_1a7b19beae90390b2f986fd0b53313bdf3"></span>void <code class="descname">set</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em>, float <em>val</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector3setEK6size_tf" title="Permalink to this definition"></a></dt>
<dd><p><strong>setitem</strong> in python </p>
</dd></dl>

<dl class="function">
550 551
<dt id="_CPPv2NK6Vector5isGpuEv">
<span id="Vector::isGpuC"></span><span class="target" id="paddleclassVector_1a35b1d06b71ac70dcf7f52c6f4043e755"></span>bool <code class="descname">isGpu</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Vector5isGpuEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
552 553 554 555
<dd><p>Return is GPU vector or not. </p>
</dd></dl>

<dl class="function">
556 557
<dt id="_CPPv2NK6Vector7getSizeEv">
<span id="Vector::getSizeC"></span><span class="target" id="paddleclassVector_1ae363669d5221a8c1e28aa9fa6bc74684"></span>size_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6Vector7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
558 559 560 561
<dd><p><strong>len</strong> in python </p>
</dd></dl>

</div>
562
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
563 564 565
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N6Vector10createZeroE6size_tb">
566 567
<span id="Vector::createZero__s.b"></span><span class="target" id="paddleclassVector_1a61bec1252f099cc49ea42e9ce0223b98"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">createZero</code><span class="sig-paren">(</span>size_t <em>sz</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector10createZeroE6size_tb" title="Permalink to this definition"></a></dt>
<dd><p>Create <a class="reference internal" href="#paddleclassVector"><span class="std std-ref">Vector</span></a> filled with zero. </p>
Y
Yu Yang 已提交
568 569 570 571
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector6createERKNSt6vectorIfEEb">
572 573
<span id="Vector::create__std::vector:float:CR.b"></span><span class="target" id="paddleclassVector_1a191c29867060da84f711debb8aa0dd6e"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">create</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;float&gt; &amp;<em>data</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector6createERKNSt6vectorIfEEb" title="Permalink to this definition"></a></dt>
<dd><p>Create <a class="reference internal" href="#paddleclassVector"><span class="std std-ref">Vector</span></a> from list of float.</p>
Y
Yu Yang 已提交
574 575 576 577 578
<p>It will create a new vector, and copy data into it. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector24createCpuVectorFromNumpyEPfib">
579 580
<span id="Vector::createCpuVectorFromNumpy__floatP.i.b"></span><span class="target" id="paddleclassVector_1a219db1f4a107683721835170f76753dd"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">createCpuVectorFromNumpy</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim</em>, bool <em>copy</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector24createCpuVectorFromNumpyEPfib" title="Permalink to this definition"></a></dt>
<dd><p>Create Cpu <a class="reference internal" href="#paddleclassVector"><span class="std std-ref">Vector</span></a> from numpy array, which dtype=float32</p>
Y
Yu Yang 已提交
581 582 583 584 585
<p>If copy is false, it will create vector inplace. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector24createGpuVectorFromNumpyEPfi">
586 587
<span id="Vector::createGpuVectorFromNumpy__floatP.i"></span><span class="target" id="paddleclassVector_1a17f51bdac45de0c34f8c74afd4a33195"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">createGpuVectorFromNumpy</code><span class="sig-paren">(</span>float *<em>data</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector24createGpuVectorFromNumpyEPfi" title="Permalink to this definition"></a></dt>
<dd><p>Create Gpu <a class="reference internal" href="#paddleclassVector"><span class="std std-ref">Vector</span></a> from numpy array, which dtype=float32. </p>
Y
Yu Yang 已提交
588 589 590
</dd></dl>

</div>
591
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
592 593 594
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N6Vector23DISABLE_COPY_AND_ASSIGNE6Vector">
595
<span id="Vector::DISABLE_COPY_AND_ASSIGN__Vector"></span><span class="target" id="paddleclassVector_1ad118d7d920592c1e6e2159e4d4a2e1e2"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector23DISABLE_COPY_AND_ASSIGNE6Vector" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
596 597 598 599 600 601 602 603 604 605 606 607 608
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector6VectorEv">
<span id="Vector::Vector"></span><span class="target" id="paddleclassVector_1a6f80c73b5f18dcf3f8e36065bdc8b9e5"></span><code class="descname">Vector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector6VectorEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6Vector12getSharedPtrEv">
<span id="Vector::getSharedPtr"></span><span class="target" id="paddleclassVector_1aee16cefb63abd2f7e1ae60c54b77fa7c"></span>void *<code class="descname">getSharedPtr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector12getSharedPtrEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
609
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
610 611 612 613 614 615 616
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N6Vector1mE">
<span id="Vector::m__VectorPrivateP"></span><span class="target" id="paddleclassVector_1a8fe494ce70d1257207e7d601fa821093"></span>VectorPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N6Vector1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
617
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
618 619 620
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N6Vector23createByPaddleVectorPtrEPv">
621
<span id="Vector::createByPaddleVectorPtr__voidP"></span><span class="target" id="paddleclassVector_1a789b71bb11350f5a7f913a65791307c0"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">createByPaddleVectorPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6Vector23createByPaddleVectorPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
622 623 624
<dd></dd></dl>

</div>
625
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassVector_1ac1c4326186d13e3c1f20eb8f39a7b5a2"></span><em class="property">friend </em><code class="descname">Parameter</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassVector_1ad416ce94f4310e1521ecfcfe6398f63c"></span><em class="property">friend </em><code class="descname">ParameterOptimizer</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassVector_1aee8833bd6e04187e6ca0ebc404f9c65c"></span><em class="property">friend </em><code class="descname">ParameterTraverseCallbackPrivate</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv27IVector">
<span id="IVector"></span><span class="target" id="paddleclassIVector"></span><em class="property">class </em><code class="descname">IVector</code><a class="headerlink" href="#_CPPv27IVector" title="Permalink to this definition"></a></dt>
648
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N7IVector19toNumpyArrayInplaceEPPiPi">
<span id="IVector::toNumpyArrayInplace__iPP.iP"></span><span class="target" id="paddleclassIVector_1aaa27f17d84f4e18deb5ad77c1f0eef96"></span>void <code class="descname">toNumpyArrayInplace</code><span class="sig-paren">(</span>int **<em>view_data</em>, int *<em>dim1</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector19toNumpyArrayInplaceEPPiPi" title="Permalink to this definition"></a></dt>
<dd><p>Cast to numpy array inplace. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector16copyToNumpyArrayEPPiPi">
<span id="IVector::copyToNumpyArray__iPP.iP"></span><span class="target" id="paddleclassIVector_1ad3e023030e669c95d2feadb926c46225"></span>void <code class="descname">copyToNumpyArray</code><span class="sig-paren">(</span>int **<em>view_m_data</em>, int *<em>dim1</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector16copyToNumpyArrayEPPiPi" title="Permalink to this definition"></a></dt>
<dd><p>Copy to numpy array. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector18copyFromNumpyArrayEPii">
<span id="IVector::copyFromNumpyArray__iP.i"></span><span class="target" id="paddleclassIVector_1ad4e8947548a561bdc3ec8f5514f5591e"></span>void <code class="descname">copyFromNumpyArray</code><span class="sig-paren">(</span>int *<em>data</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector18copyFromNumpyArrayEPii" title="Permalink to this definition"></a></dt>
<dd><p>Copy from numpy array. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVectorD0Ev">
670
<span id="IVector::~IVector"></span><span class="target" id="paddleclassIVector_1aece3c396f1997e7a504ad87a062d1eb2"></span><code class="descname">~IVector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVectorD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
671 672 673
<dd></dd></dl>

<dl class="function">
674 675
<dt id="_CPPv2NK7IVector7getDataEv">
<span id="IVector::getDataC"></span><span class="target" id="paddleclassIVector_1ac732ba17418878efe5f0be6d04f4b246"></span><a class="reference internal" href="#_CPPv28IntArray" title="IntArray">IntArray</a> <code class="descname">getData</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVector7getDataEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
676 677 678 679 680 681 682 683 684 685
<dd><p>Return a list of int, the memory is alloced and copied. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVectorixEK6size_t">
<span id="IVector::subscript-operator__sC"></span><span class="target" id="paddleclassIVector_1ac52ed6b7d8c715b1355ff3c3f58bf052"></span>int &amp;<code class="descname">operator[]</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVectorixEK6size_t" title="Permalink to this definition"></a></dt>
<dd><p>This method will map to python [] method. </p>
</dd></dl>

<dl class="function">
686 687
<dt id="_CPPv2NK7IVectorixEK6size_t">
<span id="IVector::subscript-operator__sCC"></span><span class="target" id="paddleclassIVector_1a21a07a945227d53ff5a120bab2a3ba9c"></span><em class="property">const</em> int &amp;<code class="descname">operator[]</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVectorixEK6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
688 689 690
<dd></dd></dl>

<dl class="function">
691 692
<dt id="_CPPv2NK7IVector3getEK6size_t">
<span id="IVector::get__sCC"></span><span class="target" id="paddleclassIVector_1a1c2684e184d4829535a4bd186c232e85"></span>int <code class="descname">get</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVector3getEK6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
693 694 695 696 697 698 699 700
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector3setEK6size_ti">
<span id="IVector::set__sC.i"></span><span class="target" id="paddleclassIVector_1a05f1f761560dd9ae7f5b63e333c7b63c"></span>void <code class="descname">set</code><span class="sig-paren">(</span><em class="property">const</em> size_t <em>idx</em>, int <em>val</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector3setEK6size_ti" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
701 702
<dt id="_CPPv2NK7IVector5isGpuEv">
<span id="IVector::isGpuC"></span><span class="target" id="paddleclassIVector_1aa94dd76f9b13cc9a650a5088d7a8e8d7"></span>bool <code class="descname">isGpu</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVector5isGpuEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
703 704 705 706
<dd><p>Return true if it is gpu vector. </p>
</dd></dl>

<dl class="function">
707 708
<dt id="_CPPv2NK7IVector7getSizeEv">
<span id="IVector::getSizeC"></span><span class="target" id="paddleclassIVector_1abd32489eee893fbb4293a6704875e033"></span>size_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVector7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
709 710 711 712
<dd><p>This method will map to python <strong>len</strong>();. </p>
</dd></dl>

</div>
713
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
714 715 716
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N7IVector10createZeroE6size_tb">
717 718
<span id="IVector::createZero__s.b"></span><span class="target" id="paddleclassIVector_1aa7f6906bb3cf6137920ab5818c2a9b1f"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">createZero</code><span class="sig-paren">(</span>size_t <em>sz</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector10createZeroE6size_tb" title="Permalink to this definition"></a></dt>
<dd><p>Create <a class="reference internal" href="#paddleclassIVector"><span class="std std-ref">IVector</span></a> filled with zero. </p>
Y
Yu Yang 已提交
719 720 721 722
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector6createERKNSt6vectorIiEEb">
723 724
<span id="IVector::create__std::vector:i:CR.b"></span><span class="target" id="paddleclassIVector_1a534c99a8c386470c18bb9f9bf9ca794e"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">create</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;int&gt; &amp;<em>data</em>, bool <em>useGpu</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector6createERKNSt6vectorIiEEb" title="Permalink to this definition"></a></dt>
<dd><p>Create <a class="reference internal" href="#paddleclassIVector"><span class="std std-ref">IVector</span></a> from list of int. It will create a new vector, and copy data into it. </p>
Y
Yu Yang 已提交
725 726 727 728
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector24createCpuVectorFromNumpyEPiib">
729 730
<span id="IVector::createCpuVectorFromNumpy__iP.i.b"></span><span class="target" id="paddleclassIVector_1af0c2b9b9296984a6d09607563830281d"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">createCpuVectorFromNumpy</code><span class="sig-paren">(</span>int *<em>data</em>, int <em>dim</em>, bool <em>copy</em> = false<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector24createCpuVectorFromNumpyEPiib" title="Permalink to this definition"></a></dt>
<dd><p>Create Cpu <a class="reference internal" href="#paddleclassIVector"><span class="std std-ref">IVector</span></a> from numpy array, which dtype=int32</p>
Y
Yu Yang 已提交
731 732 733 734 735
<p>If copy is false, it will create vector inplace </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector23createGpuVectorFromNumyEPii">
736 737
<span id="IVector::createGpuVectorFromNumy__iP.i"></span><span class="target" id="paddleclassIVector_1a4948a6870a1489880f9e35a94b4ad02d"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">createGpuVectorFromNumy</code><span class="sig-paren">(</span>int *<em>data</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector23createGpuVectorFromNumyEPii" title="Permalink to this definition"></a></dt>
<dd><p>Create Gpu <a class="reference internal" href="#paddleclassIVector"><span class="std std-ref">IVector</span></a> from numpy array, which dtype=int32 </p>
Y
Yu Yang 已提交
738 739 740
</dd></dl>

</div>
741
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
742 743 744 745 746 747 748 749
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N7IVector7IVectorEv">
<span id="IVector::IVector"></span><span class="target" id="paddleclassIVector_1a7474baf08355d84c605a57776b1d6c0f"></span><code class="descname">IVector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector7IVectorEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7IVector23DISABLE_COPY_AND_ASSIGNE7IVector">
750
<span id="IVector::DISABLE_COPY_AND_ASSIGN__IVector"></span><span class="target" id="paddleclassIVector_1a6668cac7202d206e97d8dcdc32970478"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector23DISABLE_COPY_AND_ASSIGNE7IVector" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
751 752 753
<dd></dd></dl>

<dl class="function">
754 755
<dt id="_CPPv2NK7IVector12getSharedPtrEv">
<span id="IVector::getSharedPtrC"></span><span class="target" id="paddleclassIVector_1a2a04cf29831f581c9e349925d8637c6d"></span>void *<code class="descname">getSharedPtr</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK7IVector12getSharedPtrEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
756 757 758
<dd></dd></dl>

</div>
759
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
760 761 762 763 764 765 766
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N7IVector1mE">
<span id="IVector::m__IVectorPrivateP"></span><span class="target" id="paddleclassIVector_1aa508d3678e8719636c04de2f7555a3c4"></span>IVectorPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N7IVector1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
767
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
768 769 770
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N7IVector23createByPaddleVectorPtrEPv">
771
<span id="IVector::createByPaddleVectorPtr__voidP"></span><span class="target" id="paddleclassIVector_1aaae14f9e9818af49c1cd90a3d3779e09"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">createByPaddleVectorPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7IVector23createByPaddleVectorPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
772 773 774
<dd></dd></dl>

</div>
775
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
776 777 778 779 780 781 782 783 784 785 786 787
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassIVector_1acbd2a21b98cd2cb694fd02340724b625"></span><em class="property">friend </em><code class="descname">Arguments</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv29Arguments">
<span id="Arguments"></span><span class="target" id="paddleclassArguments"></span><em class="property">class </em><code class="descname">Arguments</code><a class="headerlink" href="#_CPPv29Arguments" title="Permalink to this definition"></a></dt>
788
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>The <a class="reference internal" href="#paddleclassArguments"><span class="std std-ref">Arguments</span></a> is actual a std::vector&lt;paddle::Argument&gt; in paddle. </p>
789
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
790 791 792 793 794 795 796 797
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N9Arguments6resizeE6size_t">
<span id="Arguments::resize__s"></span><span class="target" id="paddleclassArguments_1a43deb80b6867830d010c6880a4aa3025"></span>void <code class="descname">resize</code><span class="sig-paren">(</span>size_t <em>slotNum</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments6resizeE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9ArgumentsD0Ev">
798
<span id="Arguments::~Arguments"></span><span class="target" id="paddleclassArguments_1a97b9ddc9cc652310880db4d6f1f175f2"></span><code class="descname">~Arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9ArgumentsD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
799 800 801
<dd></dd></dl>

<dl class="function">
802 803
<dt id="_CPPv2NK9Arguments10getSlotNumEv">
<span id="Arguments::getSlotNumC"></span><span class="target" id="paddleclassArguments_1aafc86a96884d8314e33980cdd3a0085f"></span>size_t <code class="descname">getSlotNum</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments10getSlotNumEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
804 805 806 807 808
<dd><p>Return the slot number that aguments contains.</p>
<p>It is actually the vector&#8217;s size </p>
</dd></dl>

<dl class="function">
809 810
<dt id="_CPPv2NK9Arguments12getSlotValueE6size_t">
<span id="Arguments::getSlotValue__sC"></span><span class="target" id="paddleclassArguments_1aadcfc5dd6bbdd89af60a62190796ea1e"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">getSlotValue</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments12getSlotValueE6size_t" title="Permalink to this definition"></a></dt>
811
<dd><p>The get functions of <a class="reference internal" href="#paddleclassArguments"><span class="std std-ref">Arguments</span></a></p>
Y
Yu Yang 已提交
812 813 814 815
<p>the param idx is the slot id </p>
</dd></dl>

<dl class="function">
816 817
<dt id="_CPPv2NK9Arguments10getSlotIdsE6size_t">
<span id="Arguments::getSlotIds__sC"></span><span class="target" id="paddleclassArguments_1a09713c30f9140b4de333e584d106386d"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">getSlotIds</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments10getSlotIdsE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
818 819 820
<dd></dd></dl>

<dl class="function">
821 822
<dt id="_CPPv2NK9Arguments9getSlotInE6size_t">
<span id="Arguments::getSlotIn__sC"></span><span class="target" id="paddleclassArguments_1a10206391655a3055865953e413f5ab47"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">getSlotIn</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments9getSlotInE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
823 824 825
<dd></dd></dl>

<dl class="function">
826 827
<dt id="_CPPv2NK9Arguments29getSlotSequenceStartPositionsE6size_t">
<span id="Arguments::getSlotSequenceStartPositions__sC"></span><span class="target" id="paddleclassArguments_1a0120f50da051ea694c30124e04291708"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">getSlotSequenceStartPositions</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments29getSlotSequenceStartPositionsE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
828 829
<dd></dd></dl>

Y
Yu Yang 已提交
830
<dl class="function">
831 832
<dt id="_CPPv2NK9Arguments32getSlotSubSequenceStartPositionsE6size_t">
<span id="Arguments::getSlotSubSequenceStartPositions__sC"></span><span class="target" id="paddleclassArguments_1abcfd9e6be5443622262f5dfd830333d8"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">getSlotSubSequenceStartPositions</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments32getSlotSubSequenceStartPositionsE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
833 834
<dd></dd></dl>

Y
Yu Yang 已提交
835
<dl class="function">
836 837
<dt id="_CPPv2NK9Arguments18getSlotSequenceDimE6size_t">
<span id="Arguments::getSlotSequenceDim__sC"></span><span class="target" id="paddleclassArguments_1ab8f696bfc0db59e07ca4c08aad3b323a"></span><a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<code class="descname">getSlotSequenceDim</code><span class="sig-paren">(</span>size_t <em>idx</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments18getSlotSequenceDimE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
838 839 840
<dd></dd></dl>

<dl class="function">
841 842
<dt id="_CPPv2NK9Arguments12getBatchSizeE6size_t">
<span id="Arguments::getBatchSize__sC"></span><span class="target" id="paddleclassArguments_1af7cc8fb15e0069611755a7272340c786"></span>int64_t <code class="descname">getBatchSize</code><span class="sig-paren">(</span>size_t <em>idx</em> = 0<span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments12getBatchSizeE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
843 844 845 846 847
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Arguments12setSlotValueE6size_tP6Matrix">
<span id="Arguments::setSlotValue__s.MatrixP"></span><span class="target" id="paddleclassArguments_1a46a52f5667d4c56a68cd99f88e9f72f9"></span>void <code class="descname">setSlotValue</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<em>mat</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments12setSlotValueE6size_tP6Matrix" title="Permalink to this definition"></a></dt>
848 849
<dd><p>The set functions of <a class="reference internal" href="#paddleclassArguments"><span class="std std-ref">Arguments</span></a>.</p>
<p>The param idx is the slot id. The other param is the input <a class="reference internal" href="#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> or vector. </p>
Y
Yu Yang 已提交
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866
</dd></dl>

<dl class="function">
<dt id="_CPPv2N9Arguments9setSlotInE6size_tP6Matrix">
<span id="Arguments::setSlotIn__s.MatrixP"></span><span class="target" id="paddleclassArguments_1a504d425e439e8c6bd43f1755e12f0405"></span>void <code class="descname">setSlotIn</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<em>mat</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments9setSlotInE6size_tP6Matrix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Arguments10setSlotIdsE6size_tP7IVector">
<span id="Arguments::setSlotIds__s.IVectorP"></span><span class="target" id="paddleclassArguments_1ab69f58b7da8dfc9d6cfd77417d91ead3"></span>void <code class="descname">setSlotIds</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<em>vec</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments10setSlotIdsE6size_tP7IVector" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Arguments29setSlotSequenceStartPositionsE6size_tP7IVector">
<span id="Arguments::setSlotSequenceStartPositions__s.IVectorP"></span><span class="target" id="paddleclassArguments_1afac40c682aeb538e05f45d31cb23a336"></span>void <code class="descname">setSlotSequenceStartPositions</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<em>vec</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments29setSlotSequenceStartPositionsE6size_tP7IVector" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
867 868 869 870 871
<dl class="function">
<dt id="_CPPv2N9Arguments32setSlotSubSequenceStartPositionsE6size_tP7IVector">
<span id="Arguments::setSlotSubSequenceStartPositions__s.IVectorP"></span><span class="target" id="paddleclassArguments_1a592cbeaf88963698152ce42bb54383da"></span>void <code class="descname">setSlotSubSequenceStartPositions</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<em>vec</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments32setSlotSubSequenceStartPositionsE6size_tP7IVector" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
872 873 874 875 876 877
<dl class="function">
<dt id="_CPPv2N9Arguments18setSlotSequenceDimE6size_tP7IVector">
<span id="Arguments::setSlotSequenceDim__s.IVectorP"></span><span class="target" id="paddleclassArguments_1a9e5c32ca2cdedc2385ee1859cb9339b6"></span>void <code class="descname">setSlotSequenceDim</code><span class="sig-paren">(</span>size_t <em>idx</em>, <a class="reference internal" href="#_CPPv27IVector" title="IVector">IVector</a> *<em>vec</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments18setSlotSequenceDimE6size_tP7IVector" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
878
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
879 880 881
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N9Arguments15createArgumentsE6size_t">
882
<span id="Arguments::createArguments__s"></span><span class="target" id="paddleclassArguments_1a5d908b4750be672fa6c1e4ea79403933"></span><a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> *<code class="descname">createArguments</code><span class="sig-paren">(</span>size_t <em>slotNum</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments15createArgumentsE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
883 884 885 886
<dd><p>Create a arguments with size. Note that it can be zero. </p>
</dd></dl>

</div>
887
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
888 889 890 891 892 893 894 895
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N9Arguments9ArgumentsEv">
<span id="Arguments::Arguments"></span><span class="target" id="paddleclassArguments_1afe56d8477bfae32c239771056c233311"></span><code class="descname">Arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments9ArgumentsEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Arguments23DISABLE_COPY_AND_ASSIGNE9Arguments">
896
<span id="Arguments::DISABLE_COPY_AND_ASSIGN__Arguments"></span><span class="target" id="paddleclassArguments_1a0340696d30f470a4fc49ab5bb21b447f"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments23DISABLE_COPY_AND_ASSIGNE9Arguments" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
897 898 899
<dd></dd></dl>

<dl class="function">
900 901
<dt id="_CPPv2NK9Arguments23getInternalArgumentsPtrEv">
<span id="Arguments::getInternalArgumentsPtrC"></span><span class="target" id="paddleclassArguments_1a9658e7a00a7cf5ef141dacddd6231a86"></span>void *<code class="descname">getInternalArgumentsPtr</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Arguments23getInternalArgumentsPtrEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
902 903 904
<dd></dd></dl>

</div>
905
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
906 907 908 909 910 911 912
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N9Arguments1mE">
<span id="Arguments::m__ArgumentsPrivateP"></span><span class="target" id="paddleclassArguments_1a11b76b3b6aa596985b65f9d37f3a057e"></span>ArgumentsPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N9Arguments1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
913
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
914 915 916
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N9Arguments28createByPaddleArgumentVectorEPv">
917
<span id="Arguments::createByPaddleArgumentVector__voidP"></span><span class="target" id="paddleclassArguments_1a535d7939957a3a3600cc485b8c8a134e"></span><a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> *<code class="descname">createByPaddleArgumentVector</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Arguments28createByPaddleArgumentVectorEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
918 919 920
<dd></dd></dl>

</div>
921
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassArguments_1ad38c9566742be31ca860cf8b5d6ae11f"></span><em class="property">friend </em><code class="descname">Trainer</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassArguments_1ab1e2416f07bda51a0f8da259ba54746d"></span><em class="property">friend </em><code class="descname">GradientMachine</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassArguments_1a30a1613dcc0fbf8c512ad68de0f93348"></span><em class="property">friend </em><code class="descname">SequenceGenerator</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv215ParameterConfig">
<span id="ParameterConfig"></span><span class="target" id="paddleclassParameterConfig"></span><em class="property">class </em><code class="descname">ParameterConfig</code><a class="headerlink" href="#_CPPv215ParameterConfig" title="Permalink to this definition"></a></dt>
944
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
945 946 947 948 949 950 951
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N15ParameterConfigD0Ev">
<span id="ParameterConfig::~ParameterConfig"></span><span class="target" id="paddleclassParameterConfig_1acc0e810ec910ea8650032b5cea420d35"></span><code class="descname">~ParameterConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfigD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
952 953
<dt id="_CPPv2NK15ParameterConfig13toProtoStringEv">
<span id="ParameterConfig::toProtoStringC"></span><span class="target" id="paddleclassParameterConfig_1a3d1a44420a6f5cf021b7cb287379653e"></span>std::string <code class="descname">toProtoString</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK15ParameterConfig13toProtoStringEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
954 955 956 957
<dd><p>return proto buf string. </p>
</dd></dl>

</div>
958
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
959 960 961
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N15ParameterConfig23DISABLE_COPY_AND_ASSIGNE15ParameterConfig">
962
<span id="ParameterConfig::DISABLE_COPY_AND_ASSIGN__ParameterConfig"></span><span class="target" id="paddleclassParameterConfig_1a363e50542a55bc7f30be9e5565c9c393"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfig23DISABLE_COPY_AND_ASSIGNE15ParameterConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
963 964 965 966 967 968 969 970 971 972 973 974 975
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15ParameterConfig15ParameterConfigEv">
<span id="ParameterConfig::ParameterConfig"></span><span class="target" id="paddleclassParameterConfig_1a0b853306eb877d357843461ccbe3f228"></span><code class="descname">ParameterConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfig15ParameterConfigEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15ParameterConfig9getRawPtrEv">
<span id="ParameterConfig::getRawPtr"></span><span class="target" id="paddleclassParameterConfig_1a3042fa257231e69a5a42c19456c2d61b"></span>void *<code class="descname">getRawPtr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfig9getRawPtrEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
976
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
977 978 979 980 981 982 983
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N15ParameterConfig1mE">
<span id="ParameterConfig::m__ParameterConfigPrivateP"></span><span class="target" id="paddleclassParameterConfig_1a6a23ed8de2f46c190cb1835dbd153e55"></span>ParameterConfigPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N15ParameterConfig1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
984
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
985 986 987
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N15ParameterConfig43createParameterConfigFromParameterSharedPtrEPv">
988
<span id="ParameterConfig::createParameterConfigFromParameterSharedPtr__voidP"></span><span class="target" id="paddleclassParameterConfig_1af790b10c1ca0f81f26d78d3c52d464f3"></span><a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> *<code class="descname">createParameterConfigFromParameterSharedPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfig43createParameterConfigFromParameterSharedPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
989 990 991 992 993
<dd><p>Internal methods </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N15ParameterConfig37createParameterConfigFromParameterPtrEPv">
994
<span id="ParameterConfig::createParameterConfigFromParameterPtr__voidP"></span><span class="target" id="paddleclassParameterConfig_1a26b7198a73dbd871705b59d18ad93fbe"></span><a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> *<code class="descname">createParameterConfigFromParameterPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15ParameterConfig37createParameterConfigFromParameterPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
995 996 997
<dd></dd></dl>

</div>
998
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassParameterConfig_1ac1c4326186d13e3c1f20eb8f39a7b5a2"></span><em class="property">friend </em><code class="descname">Parameter</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassParameterConfig_1ad416ce94f4310e1521ecfcfe6398f63c"></span><em class="property">friend </em><code class="descname">ParameterOptimizer</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassParameterConfig_1aee8833bd6e04187e6ca0ebc404f9c65c"></span><em class="property">friend </em><code class="descname">ParameterTraverseCallbackPrivate</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv218OptimizationConfig">
<span id="OptimizationConfig"></span><span class="target" id="paddleclassOptimizationConfig"></span><em class="property">class </em><code class="descname">OptimizationConfig</code><a class="headerlink" href="#_CPPv218OptimizationConfig" title="Permalink to this definition"></a></dt>
1021
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N18OptimizationConfigD0Ev">
<span id="OptimizationConfig::~OptimizationConfig"></span><span class="target" id="paddleclassOptimizationConfig_1acd84459799c1cb54d17fe6daf51f6218"></span><code class="descname">~OptimizationConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18OptimizationConfigD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18OptimizationConfig13toProtoStringEv">
<span id="OptimizationConfig::toProtoString"></span><span class="target" id="paddleclassOptimizationConfig_1a7d60aba25b5bbeea2354cab669ad78c2"></span>std::string <code class="descname">toProtoString</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18OptimizationConfig13toProtoStringEv" title="Permalink to this definition"></a></dt>
<dd><p>return protobuf string. </p>
</dd></dl>

</div>
1035
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1036 1037 1038
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N18OptimizationConfig21createFromProtoStringERKNSt6stringE">
1039
<span id="OptimizationConfig::createFromProtoString__ssCR"></span><span class="target" id="paddleclassOptimizationConfig_1a964b181abf272089ce9423bdf57070df"></span><a class="reference internal" href="#_CPPv218OptimizationConfig" title="OptimizationConfig">OptimizationConfig</a> *<code class="descname">createFromProtoString</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>str</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18OptimizationConfig21createFromProtoStringERKNSt6stringE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1040 1041 1042
<dd></dd></dl>

</div>
1043
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1044 1045 1046
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N18OptimizationConfig23DISABLE_COPY_AND_ASSIGNE18OptimizationConfig">
1047
<span id="OptimizationConfig::DISABLE_COPY_AND_ASSIGN__OptimizationConfig"></span><span class="target" id="paddleclassOptimizationConfig_1a40822345784a8e6c395782323c275b36"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv218OptimizationConfig" title="OptimizationConfig">OptimizationConfig</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18OptimizationConfig23DISABLE_COPY_AND_ASSIGNE18OptimizationConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1048 1049 1050 1051 1052 1053 1054 1055
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18OptimizationConfig18OptimizationConfigEv">
<span id="OptimizationConfig::OptimizationConfig"></span><span class="target" id="paddleclassOptimizationConfig_1a00d95b6c7befb4a2d9d815a48011938b"></span><code class="descname">OptimizationConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18OptimizationConfig18OptimizationConfigEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1056
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1057 1058 1059 1060 1061 1062 1063
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N18OptimizationConfig1mE">
<span id="OptimizationConfig::m__OptimizationConfigPrivateP"></span><span class="target" id="paddleclassOptimizationConfig_1a94ec596d31fbb3faacbf58ac75d4018c"></span>OptimizationConfigPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N18OptimizationConfig1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1064
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassOptimizationConfig_1ac817d6251a17c04fa8d187e02a72cd51"></span><em class="property">friend </em><code class="descname">TrainerConfig</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassOptimizationConfig_1ad416ce94f4310e1521ecfcfe6398f63c"></span><em class="property">friend </em><code class="descname">ParameterOptimizer</code></dt>
<dd></dd></dl>

1076 1077 1078 1079 1080
<dl class="function">
<dt>
<span class="target" id="paddleclassOptimizationConfig_1ad38c9566742be31ca860cf8b5d6ae11f"></span><em class="property">friend </em><code class="descname">Trainer</code></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1081 1082 1083 1084 1085 1086
</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv29Parameter">
<span id="Parameter"></span><span class="target" id="paddleclassParameter"></span><em class="property">class </em><code class="descname">Parameter</code><a class="headerlink" href="#_CPPv29Parameter" title="Permalink to this definition"></a></dt>
1087
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1088 1089 1090
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N9ParameterD0Ev">
1091
<span id="Parameter::~Parameter"></span><span class="target" id="paddleclassParameter_1a6e2ade42a712f1d3675653329266e42d"></span><code class="descname">~Parameter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9ParameterD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1092 1093 1094
<dd></dd></dl>

<dl class="function">
1095 1096
<dt id="_CPPv2NK9Parameter7getNameEv">
<span id="Parameter::getNameC"></span><span class="target" id="paddleclassParameter_1aaeb9606a194fcbed299c7a20eff96c17"></span>std::string <code class="descname">getName</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Parameter7getNameEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1097 1098 1099 1100 1101 1102
<dd><p>get parameter name </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N9Parameter6getBufE13ParameterType">
<span id="Parameter::getBuf__ParameterType"></span><span class="target" id="paddleclassParameter_1a707a3e62db9312aa9c23bc8670f2b8eb"></span><a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *<code class="descname">getBuf</code><span class="sig-paren">(</span>ParameterType <em>type</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter6getBufE13ParameterType" title="Permalink to this definition"></a></dt>
1103
<dd><p>get buf in <a class="reference internal" href="#paddleclassParameter"><span class="std std-ref">Parameter</span></a> </p>
Y
Yu Yang 已提交
1104 1105 1106
</dd></dl>

<dl class="function">
1107 1108
<dt id="_CPPv2NK9Parameter5getIDEv">
<span id="Parameter::getIDC"></span><span class="target" id="paddleclassParameter_1a0350f59ffc36e9d958c962907824b148"></span>size_t <code class="descname">getID</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK9Parameter5getIDEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1109 1110 1111 1112 1113 1114 1115 1116 1117
<dd><p>get id </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N9Parameter9getConfigEv">
<span id="Parameter::getConfig"></span><span class="target" id="paddleclassParameter_1ab73b2800070b4ceb1d5209601aef40fd"></span><a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> *<code class="descname">getConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter9getConfigEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1118
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1119 1120 1121 1122 1123 1124 1125 1126
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N9Parameter9ParameterEv">
<span id="Parameter::Parameter"></span><span class="target" id="paddleclassParameter_1a5ba93ca36c3261d3850e67f92717c2f5"></span><code class="descname">Parameter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter9ParameterEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Parameter23DISABLE_COPY_AND_ASSIGNE9Parameter">
1127
<span id="Parameter::DISABLE_COPY_AND_ASSIGN__Parameter"></span><span class="target" id="paddleclassParameter_1afbdb2d2a969eb721691b1dea6fe9692c"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv29Parameter" title="Parameter">Parameter</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter23DISABLE_COPY_AND_ASSIGNE9Parameter" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1128 1129 1130
<dd></dd></dl>

</div>
1131
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1132 1133 1134 1135 1136 1137 1138
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N9Parameter1mE">
<span id="Parameter::m__ParameterPrivateP"></span><span class="target" id="paddleclassParameter_1a18b314888c71ee74d6e33f598892dcfc"></span>ParameterPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N9Parameter1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1139
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1140 1141 1142
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N9Parameter16createFromRawPtrEPv">
1143
<span id="Parameter::createFromRawPtr__voidP"></span><span class="target" id="paddleclassParameter_1a608119cec240fc1522adb4371710b477"></span><a class="reference internal" href="#_CPPv29Parameter" title="Parameter">Parameter</a> *<code class="descname">createFromRawPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter16createFromRawPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1144 1145 1146 1147
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N9Parameter19createFromSharedPtrEPv">
1148
<span id="Parameter::createFromSharedPtr__voidP"></span><span class="target" id="paddleclassParameter_1ac02845aa3e1b56c928c9dfd9c2103636"></span><a class="reference internal" href="#_CPPv29Parameter" title="Parameter">Parameter</a> *<code class="descname">createFromSharedPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N9Parameter19createFromSharedPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1149 1150 1151
<dd></dd></dl>

</div>
1152
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassParameter_1af850a37a5bc6e45d296e4c16b7634e60"></span><em class="property">friend </em><code class="descname">UpdateCallbackWrapper</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassParameter_1ab1e2416f07bda51a0f8da259ba54746d"></span><em class="property">friend </em><code class="descname">GradientMachine</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv211ModelConfig">
<span id="ModelConfig"></span><span class="target" id="paddleclassModelConfig"></span><em class="property">class </em><code class="descname">ModelConfig</code><a class="headerlink" href="#_CPPv211ModelConfig" title="Permalink to this definition"></a></dt>
1170 1171
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>You can only get model config from <a class="reference internal" href="#paddleclassTrainerConfig"><span class="std std-ref">TrainerConfig</span></a>.</p>
<p>It is used by <a class="reference internal" href="#paddleclassGradientMachine"><span class="std std-ref">GradientMachine</span></a>. </p>
1172
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1173 1174 1175
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N11ModelConfigD0Ev">
1176
<span id="ModelConfig::~ModelConfig"></span><span class="target" id="paddleclassModelConfig_1ac16a0a33aba4a9a068010ae7ae685e55"></span><code class="descname">~ModelConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N11ModelConfigD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1177 1178 1179
<dd></dd></dl>

</div>
1180
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1181 1182 1183 1184 1185 1186 1187 1188
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N11ModelConfig11ModelConfigEv">
<span id="ModelConfig::ModelConfig"></span><span class="target" id="paddleclassModelConfig_1ad49588e37626f1be2fe8a1bc5ef53ae2"></span><code class="descname">ModelConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N11ModelConfig11ModelConfigEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N11ModelConfig23DISABLE_COPY_AND_ASSIGNE11ModelConfig">
1189
<span id="ModelConfig::DISABLE_COPY_AND_ASSIGN__ModelConfig"></span><span class="target" id="paddleclassModelConfig_1a3509bd28ab5633ad2d182d588c4f707c"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N11ModelConfig23DISABLE_COPY_AND_ASSIGNE11ModelConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1190 1191 1192
<dd></dd></dl>

</div>
1193
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1194 1195 1196 1197 1198 1199 1200
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N11ModelConfig1mE">
<span id="ModelConfig::m__ModelConfigPrivateP"></span><span class="target" id="paddleclassModelConfig_1ac3c545f9de1a6be4ef68ad4fa6e7e711"></span>ModelConfigPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N11ModelConfig1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1201
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassModelConfig_1ac817d6251a17c04fa8d187e02a72cd51"></span><em class="property">friend </em><code class="descname">TrainerConfig</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassModelConfig_1a5fd9acf0855eab0468eba6906cdea98d"></span><em class="property">friend </em><code class="descname">TrainerConfigPrivate</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<span class="target" id="paddleclassModelConfig_1ab1e2416f07bda51a0f8da259ba54746d"></span><em class="property">friend </em><code class="descname">GradientMachine</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv213TrainerConfig">
<span id="TrainerConfig"></span><span class="target" id="paddleclassTrainerConfig"></span><em class="property">class </em><code class="descname">TrainerConfig</code><a class="headerlink" href="#_CPPv213TrainerConfig" title="Permalink to this definition"></a></dt>
1224 1225
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>To get <a class="reference internal" href="#paddleclassTrainerConfig"><span class="std std-ref">TrainerConfig</span></a> from file.</p>
<p>It is used by <a class="reference internal" href="#paddleclassGradientMachine"><span class="std std-ref">GradientMachine</span></a>. </p>
1226
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1227 1228 1229
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N13TrainerConfigD0Ev">
1230
<span id="TrainerConfig::~TrainerConfig"></span><span class="target" id="paddleclassTrainerConfig_1a26c778f1056b7dedae28bdd03aa2915a"></span><code class="descname">~TrainerConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N13TrainerConfigD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1231 1232 1233
<dd></dd></dl>

<dl class="function">
1234 1235
<dt id="_CPPv2NK13TrainerConfig14getModelConfigEv">
<span id="TrainerConfig::getModelConfigC"></span><span class="target" id="paddleclassTrainerConfig_1af32fc14ad603f47d37b117da60cf264e"></span><a class="reference internal" href="#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a> *<code class="descname">getModelConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK13TrainerConfig14getModelConfigEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1236 1237 1238
<dd></dd></dl>

<dl class="function">
1239 1240
<dt id="_CPPv2NK13TrainerConfig21getOptimizationConfigEv">
<span id="TrainerConfig::getOptimizationConfigC"></span><span class="target" id="paddleclassTrainerConfig_1a6a710e7afdfe912bb3cb5252ad2fa350"></span><a class="reference internal" href="#_CPPv218OptimizationConfig" title="OptimizationConfig">OptimizationConfig</a> *<code class="descname">getOptimizationConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK13TrainerConfig21getOptimizationConfigEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1241 1242 1243
<dd></dd></dl>

</div>
1244
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1245 1246 1247
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N13TrainerConfig27createFromTrainerConfigFileERKNSt6stringE">
1248
<span id="TrainerConfig::createFromTrainerConfigFile__ssCR"></span><span class="target" id="paddleclassTrainerConfig_1af86151255ec8119eef3d280da7c727c7"></span><a class="reference internal" href="#_CPPv213TrainerConfig" title="TrainerConfig">TrainerConfig</a> *<code class="descname">createFromTrainerConfigFile</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>configPath</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N13TrainerConfig27createFromTrainerConfigFileERKNSt6stringE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1249 1250
<dd></dd></dl>

1251 1252 1253 1254 1255
<dl class="function">
<dt id="_CPPv2N13TrainerConfig21createFromProtoStringERKNSt6stringE">
<span id="TrainerConfig::createFromProtoString__ssCR"></span><span class="target" id="paddleclassTrainerConfig_1a4f878a84bd430867522655819f122a68"></span><a class="reference internal" href="#_CPPv213TrainerConfig" title="TrainerConfig">TrainerConfig</a> *<code class="descname">createFromProtoString</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>str</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N13TrainerConfig21createFromProtoStringERKNSt6stringE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1256
</div>
1257
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1258 1259 1260 1261 1262 1263 1264 1265
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N13TrainerConfig13TrainerConfigEv">
<span id="TrainerConfig::TrainerConfig"></span><span class="target" id="paddleclassTrainerConfig_1a6aeee3833f147c995c5d5676af494ae1"></span><code class="descname">TrainerConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N13TrainerConfig13TrainerConfigEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N13TrainerConfig23DISABLE_COPY_AND_ASSIGNE13TrainerConfig">
1266
<span id="TrainerConfig::DISABLE_COPY_AND_ASSIGN__TrainerConfig"></span><span class="target" id="paddleclassTrainerConfig_1a4dff02a98cae696db1c2284231a40c0b"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv213TrainerConfig" title="TrainerConfig">TrainerConfig</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N13TrainerConfig23DISABLE_COPY_AND_ASSIGNE13TrainerConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1267 1268 1269
<dd></dd></dl>

</div>
1270
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1271 1272 1273 1274 1275 1276
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N13TrainerConfig1mE">
<span id="TrainerConfig::m__TrainerConfigPrivateP"></span><span class="target" id="paddleclassTrainerConfig_1a0c77f5cfcfcf1a46c0ff91e02072cc03"></span>TrainerConfigPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N13TrainerConfig1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

1277
</div>
1278
<div class="breathe-sectiondef docutils container">
1279 1280 1281 1282 1283 1284
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassTrainerConfig_1ad38c9566742be31ca860cf8b5d6ae11f"></span><em class="property">friend </em><code class="descname">Trainer</code></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1285 1286 1287 1288 1289 1290 1291 1292
</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv214UpdateCallback">
<span id="UpdateCallback"></span><span class="target" id="paddleclassUpdateCallback"></span><em class="property">class </em><code class="descname">UpdateCallback</code><a class="headerlink" href="#_CPPv214UpdateCallback" title="Permalink to this definition"></a></dt>
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>The callback in backword.</p>
<p>You can inherit this class in python.</p>
1293
<p><div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">UpdateCallbackInPython</span><span class="p">(</span><span class="n">paddle</span><span class="o">.</span><span class="n">UpdateCallback</span><span class="p">):</span>
Y
Yu Yang 已提交
1294 1295 1296 1297 1298 1299 1300
  <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">paddle</span><span class="o">.</span><span class="n">UpdateCallback</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>

  <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">param</span><span class="p">):</span>
    <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">param</span><span class="p">,</span> <span class="n">paddle</span><span class="o">.</span><span class="n">Parameter</span><span class="p">)</span>
</pre></div>
</div>
1301
 </p>
1302
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1303 1304 1305
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N14UpdateCallbackD0Ev">
1306
<span id="UpdateCallback::~UpdateCallback"></span><span class="target" id="paddleclassUpdateCallback_1ae8b9922ced234f41e188467e1e10747c"></span><code class="descname">~UpdateCallback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N14UpdateCallbackD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1307 1308 1309 1310
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N14UpdateCallback5applyEP9Parameter">
1311
<span id="UpdateCallback::apply__ParameterP"></span><span class="target" id="paddleclassUpdateCallback_1a5c51ebbbf4d5f743b730de54ae44211f"></span>void <code class="descname">apply</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv29Parameter" title="Parameter">Parameter</a> *<em>p</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N14UpdateCallback5applyEP9Parameter" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1312 1313 1314 1315 1316 1317 1318 1319
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv225ParameterTraverseCallback">
<span id="ParameterTraverseCallback"></span><span class="target" id="paddleclassParameterTraverseCallback"></span><em class="property">class </em><code class="descname">ParameterTraverseCallback</code><a class="headerlink" href="#_CPPv225ParameterTraverseCallback" title="Permalink to this definition"></a></dt>
1320
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N25ParameterTraverseCallbackD0Ev">
<span id="ParameterTraverseCallback::~ParameterTraverseCallback"></span><span class="target" id="paddleclassParameterTraverseCallback_1afb9af91bbeb9ceb60b046a0ff4d6866f"></span><code class="descname">~ParameterTraverseCallback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N25ParameterTraverseCallbackD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N25ParameterTraverseCallback5applyERKNSt6vectorIP6VectorEERK15ParameterConfig6size_t">
<span id="ParameterTraverseCallback::apply__std::vector:VectorP:CR.ParameterConfigCR.s"></span><span class="target" id="paddleclassParameterTraverseCallback_1aa6fa53a162bc6c98fd5a4ab77444f771"></span>void <code class="descname">apply</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;<a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *&gt; &amp;<em>vecs</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> &amp;<em>config</em>, size_t <em>sparseId</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N25ParameterTraverseCallback5applyERKNSt6vectorIP6VectorEERK15ParameterConfig6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1333
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1334 1335 1336
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N25ParameterTraverseCallback23DISABLE_COPY_AND_ASSIGNE25ParameterTraverseCallback">
1337
<span id="ParameterTraverseCallback::DISABLE_COPY_AND_ASSIGN__ParameterTraverseCallback"></span><span class="target" id="paddleclassParameterTraverseCallback_1a1003490942dda1af39cd327a6ba2ac1c"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv225ParameterTraverseCallback" title="ParameterTraverseCallback">ParameterTraverseCallback</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N25ParameterTraverseCallback23DISABLE_COPY_AND_ASSIGNE25ParameterTraverseCallback" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1338 1339 1340 1341 1342 1343 1344 1345
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N25ParameterTraverseCallback25ParameterTraverseCallbackEv">
<span id="ParameterTraverseCallback::ParameterTraverseCallback"></span><span class="target" id="paddleclassParameterTraverseCallback_1a08e013e6150dca3ee4603a5ca238f8f2"></span><code class="descname">ParameterTraverseCallback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N25ParameterTraverseCallback25ParameterTraverseCallbackEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1346
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1347 1348 1349 1350 1351 1352 1353
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N25ParameterTraverseCallback1mE">
<span id="ParameterTraverseCallback::m__ParameterTraverseCallbackPrivateP"></span><span class="target" id="paddleclassParameterTraverseCallback_1a005dc5c22cd06bfd3d7257679b05bd4d"></span>ParameterTraverseCallbackPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N25ParameterTraverseCallback1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1354
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassParameterTraverseCallback_1ad416ce94f4310e1521ecfcfe6398f63c"></span><em class="property">friend </em><code class="descname">ParameterOptimizer</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv218ParameterOptimizer">
<span id="ParameterOptimizer"></span><span class="target" id="paddleclassParameterOptimizer"></span><em class="property">class </em><code class="descname">ParameterOptimizer</code><a class="headerlink" href="#_CPPv218ParameterOptimizer" title="Permalink to this definition"></a></dt>
1367
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N18ParameterOptimizerD0Ev">
<span id="ParameterOptimizer::~ParameterOptimizer"></span><span class="target" id="paddleclassParameterOptimizer_1aaee3b9a3fcb0f3de97f22c88cef36d5c"></span><code class="descname">~ParameterOptimizer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizerD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer4initE6size_tPK15ParameterConfig">
<span id="ParameterOptimizer::init__s.ParameterConfigCP"></span><span class="target" id="paddleclassParameterOptimizer_1aae2fd1cadee595743e3b5657ddc7a871"></span>void <code class="descname">init</code><span class="sig-paren">(</span>size_t <em>numRows</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> *<em>config</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer4initE6size_tPK15ParameterConfig" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer9startPassEv">
<span id="ParameterOptimizer::startPass"></span><span class="target" id="paddleclassParameterOptimizer_1a1164c6deb6ddaa5b01de88cce18f6dd7"></span>void <code class="descname">startPass</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer9startPassEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer10finishPassEv">
<span id="ParameterOptimizer::finishPass"></span><span class="target" id="paddleclassParameterOptimizer_1adce3bd2832424765bed4884716944703"></span>void <code class="descname">finishPass</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer10finishPassEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer10startBatchE6size_t">
<span id="ParameterOptimizer::startBatch__s"></span><span class="target" id="paddleclassParameterOptimizer_1a7f58010ad5b004b007b5622de0b3f74b"></span>void <code class="descname">startBatch</code><span class="sig-paren">(</span>size_t <em>numSamplesProcessed</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer10startBatchE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer11finishBatchEv">
<span id="ParameterOptimizer::finishBatch"></span><span class="target" id="paddleclassParameterOptimizer_1a29f402ef555c5fb9fb4f8dcfc296dbb1"></span>void <code class="descname">finishBatch</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer11finishBatchEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer6updateERKNSt6vectorIP6VectorEERK15ParameterConfig6size_t">
<span id="ParameterOptimizer::update__std::vector:VectorP:CR.ParameterConfigCR.s"></span><span class="target" id="paddleclassParameterOptimizer_1a1ccbfd6f318af1ebaf0c9ceb3277e8dc"></span>void <code class="descname">update</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;<a class="reference internal" href="#_CPPv26Vector" title="Vector">Vector</a> *&gt; &amp;<em>vecs</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> &amp;<em>conf</em>, size_t <em>sparseId</em> = NO_SPARSE_ID<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer6updateERKNSt6vectorIP6VectorEERK15ParameterConfig6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
1405 1406
<dt id="_CPPv2NK18ParameterOptimizer17getParameterTypesEv">
<span id="ParameterOptimizer::getParameterTypesC"></span><span class="target" id="paddleclassParameterOptimizer_1a59837463b036ae7b83d6c4501c35584c"></span>std::vector&lt;int&gt; <code class="descname">getParameterTypes</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK18ParameterOptimizer17getParameterTypesEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1407 1408 1409
<dd></dd></dl>

<dl class="function">
1410 1411
<dt id="_CPPv2NK18ParameterOptimizer20needSpecialTraversalERK15ParameterConfig">
<span id="ParameterOptimizer::needSpecialTraversal__ParameterConfigCRC"></span><span class="target" id="paddleclassParameterOptimizer_1a2321ecfc7f5d604c3f59daf61dff22dc"></span><a class="reference internal" href="#_CPPv225ParameterTraverseCallback" title="ParameterTraverseCallback">ParameterTraverseCallback</a> *<code class="descname">needSpecialTraversal</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv215ParameterConfig" title="ParameterConfig">ParameterConfig</a> &amp;<em>config</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK18ParameterOptimizer20needSpecialTraversalERK15ParameterConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1412 1413 1414
<dd></dd></dl>

</div>
1415
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1416 1417 1418
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer6createEP18OptimizationConfig">
1419
<span id="ParameterOptimizer::create__OptimizationConfigP"></span><span class="target" id="paddleclassParameterOptimizer_1a4b9220d6d8defb8410a65b5f3cbf040d"></span><a class="reference internal" href="#_CPPv218ParameterOptimizer" title="ParameterOptimizer">ParameterOptimizer</a> *<code class="descname">create</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv218OptimizationConfig" title="OptimizationConfig">OptimizationConfig</a> *<em>config</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer6createEP18OptimizationConfig" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1420 1421 1422
<dd></dd></dl>

</div>
1423
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1424 1425 1426
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer23DISABLE_COPY_AND_ASSIGNE18ParameterOptimizer">
1427
<span id="ParameterOptimizer::DISABLE_COPY_AND_ASSIGN__ParameterOptimizer"></span><span class="target" id="paddleclassParameterOptimizer_1a05654f9683db19ad240a2ef34e1dbc99"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv218ParameterOptimizer" title="ParameterOptimizer">ParameterOptimizer</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer23DISABLE_COPY_AND_ASSIGNE18ParameterOptimizer" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1428 1429 1430 1431 1432 1433 1434 1435
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N18ParameterOptimizer18ParameterOptimizerEv">
<span id="ParameterOptimizer::ParameterOptimizer"></span><span class="target" id="paddleclassParameterOptimizer_1a9744084718d8090f606e42cf22fc7a07"></span><code class="descname">ParameterOptimizer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N18ParameterOptimizer18ParameterOptimizerEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1436
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N18ParameterOptimizer1mE">
<span id="ParameterOptimizer::m__ParameterOptimizerPrivateP"></span><span class="target" id="paddleclassParameterOptimizer_1a22235408c9a63cb9682fea65c5c22935"></span>ParameterOptimizerPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N18ParameterOptimizer1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv215GradientMachine">
<span id="GradientMachine"></span><span class="target" id="paddleclassGradientMachine"></span><em class="property">class </em><code class="descname">GradientMachine</code><a class="headerlink" href="#_CPPv215GradientMachine" title="Permalink to this definition"></a></dt>
1449
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1450 1451 1452
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N15GradientMachineD0Ev">
1453
<span id="GradientMachine::~GradientMachine"></span><span class="target" id="paddleclassGradientMachine_1a55f3ccf05fa39966897655fb25fdfaae"></span><code class="descname">~GradientMachine</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachineD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1454 1455 1456 1457 1458
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine7forwardERK9ArgumentsP9Arguments8PassType">
<span id="GradientMachine::forward__ArgumentsCR.ArgumentsP.PassType"></span><span class="target" id="paddleclassGradientMachine_1adf9f7521b780136a8c75724dd60538c5"></span>void <code class="descname">forward</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> &amp;<em>inArgs</em>, <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> *<em>outArgs</em>, PassType <em>passType</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine7forwardERK9ArgumentsP9Arguments8PassType" title="Permalink to this definition"></a></dt>
1459
<dd><p>The forward stage of <a class="reference internal" href="#paddleclassGradientMachine"><span class="std std-ref">GradientMachine</span></a>.</p>
Y
Yu Yang 已提交
1460 1461
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
1462 1463 1464
<dd><p class="first">the outArgs could be zero length arguemnts. </p>
<p class="last">THIS METHOD IS VERY USEFULL FOR PREDICT FROM TRAINED MODEL. </p>
</dd>
Y
Yu Yang 已提交
1465 1466 1467 1468 1469 1470 1471
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine8backwardERK14UpdateCallback">
<span id="GradientMachine::backward__UpdateCallbackCR"></span><span class="target" id="paddleclassGradientMachine_1a5f6f355815d029a66868d3f955fade0c"></span>void <code class="descname">backward</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv214UpdateCallback" title="UpdateCallback">UpdateCallback</a> &amp;<em>callback</em> = UpdateCallback ()<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine8backwardERK14UpdateCallback" title="Permalink to this definition"></a></dt>
1472
<dd><p>The backward stage of <a class="reference internal" href="#paddleclassGradientMachine"><span class="std std-ref">GradientMachine</span></a>.</p>
Y
Yu Yang 已提交
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>Currently the ParameterUpdater is not wrapped in SWIG, so backward cannot actually train a network. But you can write a update callback to change the parameter or implement a ParameterUpdater in python side. </dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine15forwardBackwardERK9ArgumentsP9Arguments8PassTypeRK14UpdateCallback">
<span id="GradientMachine::forwardBackward__ArgumentsCR.ArgumentsP.PassType.UpdateCallbackCR"></span><span class="target" id="paddleclassGradientMachine_1a693c4c218cdfbdfd9c9394c08c10f6e5"></span>void <code class="descname">forwardBackward</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> &amp;<em>inArgs</em>, <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> *<em>outArgs</em>, PassType <em>passType</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv214UpdateCallback" title="UpdateCallback">UpdateCallback</a> &amp;<em>callback</em> = UpdateCallback ()<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine15forwardBackwardERK9ArgumentsP9Arguments8PassTypeRK14UpdateCallback" title="Permalink to this definition"></a></dt>
<dd><p>Combine forward/backward </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine14loadParametersERKNSt6stringE">
<span id="GradientMachine::loadParameters__ssCR"></span><span class="target" id="paddleclassGradientMachine_1ad67c4327f3706450f2136f8344b61d18"></span>void <code class="descname">loadParameters</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine14loadParametersERKNSt6stringE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
1492 1493
<dt id="_CPPv2NK15GradientMachine16getParameterSizeEv">
<span id="GradientMachine::getParameterSizeC"></span><span class="target" id="paddleclassGradientMachine_1a2681bb26ebfe6f9212834c868e519a67"></span>size_t <code class="descname">getParameterSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK15GradientMachine16getParameterSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine12getParameterE6size_t">
<span id="GradientMachine::getParameter__s"></span><span class="target" id="paddleclassGradientMachine_1abd2e81d44faad4b6be6277d34fd2d5cd"></span><a class="reference internal" href="#_CPPv29Parameter" title="Parameter">Parameter</a> *<code class="descname">getParameter</code><span class="sig-paren">(</span>size_t <em>i</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine12getParameterE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine14randParametersEv">
<span id="GradientMachine::randParameters"></span><span class="target" id="paddleclassGradientMachine_1af6aaa9545c90e648303288f24979eca1"></span>void <code class="descname">randParameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine14randParametersEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
1507 1508
<dt id="_CPPv2NK15GradientMachine14getLayerOutputERKNSt6stringE">
<span id="GradientMachine::getLayerOutput__ssCRC"></span><span class="target" id="paddleclassGradientMachine_1aeb5ae6d93bd7d894d545508c5430c3d8"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">getLayerOutput</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>layerName</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK15GradientMachine14getLayerOutputERKNSt6stringE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine19asSequenceGeneratorERKNSt6vectorINSt6stringEEE6size_t6size_t6size_t6size_t">
<span id="GradientMachine::asSequenceGenerator__std::vector:ss:CR.s.s.s.s"></span><span class="target" id="paddleclassGradientMachine_1a5dce7940dbd15cc42a0d0d58aafca0e5"></span><a class="reference internal" href="#_CPPv217SequenceGenerator" title="SequenceGenerator">SequenceGenerator</a> *<code class="descname">asSequenceGenerator</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;std::string&gt; &amp;<em>dict</em> = std::vector&lt; std::string &gt;(), size_t <em>begin_id</em> = 0UL, size_t <em>end_id</em> = 0UL, size_t <em>max_length</em> = 100UL, size_t <em>beam_size</em> = -1UL<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine19asSequenceGeneratorERKNSt6vectorINSt6stringEEE6size_t6size_t6size_t6size_t" title="Permalink to this definition"></a></dt>
<dd><p>Create a sequence generator.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>It just like a paddle_gen_sequence. </dd>
</dl>
</p>
</dd></dl>

</div>
1523
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1524 1525 1526
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N15GradientMachine22createByConfigProtoStrERKNSt6stringE26GradientMatchineCreateModeRKNSt6vectorIiEE">
1527
<span id="GradientMachine::createByConfigProtoStr__ssCR.GradientMatchineCreateMode.std::vector:i:CR"></span><span class="target" id="paddleclassGradientMachine_1afdbbf4112a6d2e5c63aa71f932007004"></span><a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a> *<code class="descname">createByConfigProtoStr</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>protoStr</em>, <a class="reference internal" href="#_CPPv226GradientMatchineCreateMode" title="GradientMatchineCreateMode">GradientMatchineCreateMode</a> <em>mode</em> = CREATE_MODE_NORMAL, <em class="property">const</em> std::vector&lt;int&gt; &amp;<em>parameterTypes</em> = defaultParamTypes<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine22createByConfigProtoStrERKNSt6stringE26GradientMatchineCreateModeRKNSt6vectorIiEE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1528 1529 1530 1531 1532 1533
<dd><p>Create By ProtoStr.</p>
<p>The ProtoStr can be generate by python&#8217;s protobuf code. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine19createByModelConfigEP11ModelConfig26GradientMatchineCreateModeRKNSt6vectorIiEE">
1534 1535 1536
<span id="GradientMachine::createByModelConfig__ModelConfigP.GradientMatchineCreateMode.std::vector:i:CR"></span><span class="target" id="paddleclassGradientMachine_1a18e83542198df7f755efdf4cc98046d2"></span><a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a> *<code class="descname">createByModelConfig</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a> *<em>conf</em>, <a class="reference internal" href="#_CPPv226GradientMatchineCreateMode" title="GradientMatchineCreateMode">GradientMatchineCreateMode</a> <em>mode</em> = CREATE_MODE_NORMAL, <em class="property">const</em> std::vector&lt;int&gt; &amp;<em>parameterTypes</em> = defaultParamTypes<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine19createByModelConfigEP11ModelConfig26GradientMatchineCreateModeRKNSt6vectorIiEE" title="Permalink to this definition"></a></dt>
<dd><p>Create by <a class="reference internal" href="#paddleclassModelConfig"><span class="std std-ref">ModelConfig</span></a> object.</p>
<p>To get <a class="reference internal" href="#paddleclassModelConfig"><span class="std std-ref">ModelConfig</span></a>, you can get <a class="reference internal" href="#paddleclassTrainerConfig"><span class="std std-ref">TrainerConfig</span></a> from config file, then get model config by <a class="reference internal" href="#paddleclassTrainerConfig"><span class="std std-ref">TrainerConfig</span></a> </p>
Y
Yu Yang 已提交
1537 1538 1539
</dd></dl>

</div>
1540
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1541 1542 1543 1544 1545 1546 1547 1548
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N15GradientMachine15GradientMachineEv">
<span id="GradientMachine::GradientMachine"></span><span class="target" id="paddleclassGradientMachine_1a6ecb8d2e6d00afb9aabc3865ee9e24fc"></span><code class="descname">GradientMachine</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine15GradientMachineEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N15GradientMachine23DISABLE_COPY_AND_ASSIGNE15GradientMachine">
1549
<span id="GradientMachine::DISABLE_COPY_AND_ASSIGN__GradientMachine"></span><span class="target" id="paddleclassGradientMachine_1a3f0ac25f9cc26793ebdffdadf83443a8"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine23DISABLE_COPY_AND_ASSIGNE15GradientMachine" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1550 1551 1552
<dd></dd></dl>

</div>
1553
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1554 1555 1556 1557 1558 1559 1560
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N15GradientMachine1mE">
<span id="GradientMachine::m__GradientMachinePrivateP"></span><span class="target" id="paddleclassGradientMachine_1a5395af578e6d3555c34055de2eaeb05d"></span>GradientMachinePrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N15GradientMachine1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1561
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1562 1563
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
1564 1565
<dt id="_CPPv2N15GradientMachine24createFromPaddleModelPtrEPKv26GradientMatchineCreateModeRKNSt6vectorIiEE">
<span id="GradientMachine::createFromPaddleModelPtr__voidCP.GradientMatchineCreateMode.std::vector:i:CR"></span><span class="target" id="paddleclassGradientMachine_1a8019b6c8ad220a68d32c134a47b64cae"></span><a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a> *<code class="descname">createFromPaddleModelPtr</code><span class="sig-paren">(</span><em class="property">const</em> void *<em>confPtr</em>, <a class="reference internal" href="#_CPPv226GradientMatchineCreateMode" title="GradientMatchineCreateMode">GradientMatchineCreateMode</a> <em>mode</em>, <em class="property">const</em> std::vector&lt;int&gt; &amp;<em>types</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N15GradientMachine24createFromPaddleModelPtrEPKv26GradientMatchineCreateModeRKNSt6vectorIiEE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1566 1567 1568
<dd></dd></dl>

</div>
1569
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1570 1571 1572 1573 1574 1575
<p class="breathe-sectiondef-title rubric">Private Static Attributes</p>
<dl class="member">
<dt id="_CPPv2N15GradientMachine17defaultParamTypesE">
<span id="GradientMachine::defaultParamTypes__std::vector:i:"></span><span class="target" id="paddleclassGradientMachine_1ac6ca193c6e3fc90ce0e555d1e4d39642"></span>std::vector&lt;int&gt; <code class="descname">defaultParamTypes</code><a class="headerlink" href="#_CPPv2N15GradientMachine17defaultParamTypesE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

1576
</div>
1577
<div class="breathe-sectiondef docutils container">
1578 1579 1580 1581 1582 1583
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassGradientMachine_1ad38c9566742be31ca860cf8b5d6ae11f"></span><em class="property">friend </em><code class="descname">Trainer</code></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1584 1585 1586 1587 1588 1589
</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv27Trainer">
<span id="Trainer"></span><span class="target" id="paddleclassTrainer"></span><em class="property">class </em><code class="descname">Trainer</code><a class="headerlink" href="#_CPPv27Trainer" title="Permalink to this definition"></a></dt>
1590
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1591 1592 1593
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N7TrainerD0Ev">
1594
<span id="Trainer::~Trainer"></span><span class="target" id="paddleclassTrainer_1aa3d993d1eb090f4111e12a710fe9d3f6"></span><code class="descname">~Trainer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7TrainerD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1595 1596 1597 1598 1599
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer10startTrainEv">
<span id="Trainer::startTrain"></span><span class="target" id="paddleclassTrainer_1a5c7b360b7ac4b1d772f6da94db5e2b78"></span>void <code class="descname">startTrain</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer10startTrainEv" title="Permalink to this definition"></a></dt>
1600
<dd><p>Start training. </p>
Y
Yu Yang 已提交
1601 1602 1603 1604 1605
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer11finishTrainEv">
<span id="Trainer::finishTrain"></span><span class="target" id="paddleclassTrainer_1ab7a1ab3cd10ab8ce0f56b63fd0b0eb72"></span>void <code class="descname">finishTrain</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer11finishTrainEv" title="Permalink to this definition"></a></dt>
1606 1607
<dd><p>Finish training. </p>
</dd></dl>
Y
Yu Yang 已提交
1608 1609 1610 1611

<dl class="function">
<dt id="_CPPv2N7Trainer14startTrainPassEv">
<span id="Trainer::startTrainPass"></span><span class="target" id="paddleclassTrainer_1a11140ee62a182e59b5f8fe7d61c0208f"></span>void <code class="descname">startTrainPass</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer14startTrainPassEv" title="Permalink to this definition"></a></dt>
1612
<dd><p>Start a pass. </p>
Y
Yu Yang 已提交
1613 1614 1615 1616 1617
</dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer15finishTrainPassEv">
<span id="Trainer::finishTrainPass"></span><span class="target" id="paddleclassTrainer_1af604ac8201215ca12cf8658faa4cc28e"></span>void <code class="descname">finishTrainPass</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer15finishTrainPassEv" title="Permalink to this definition"></a></dt>
1618 1619
<dd><p>Finish a pass. </p>
</dd></dl>
Y
Yu Yang 已提交
1620 1621 1622

<dl class="function">
<dt id="_CPPv2N7Trainer13trainOneBatchE6size_t">
1623
<span id="Trainer::trainOneBatch__s"></span><span class="target" id="paddleclassTrainer_1ae0b80ec29762173436cc4eaaf03b1b2f"></span>bool <code class="descname">trainOneBatch</code><span class="sig-paren">(</span>size_t <em>batchSize</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer13trainOneBatchE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1624 1625 1626 1627 1628 1629 1630 1631 1632
<dd><p>Train one batch,</p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>true if all batch finished. </dd>
</dl>
</p>
</dd></dl>

<dl class="function">
1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644
<dt id="_CPPv2N7Trainer17trainOneDataBatchE6size_tRK9Arguments">
<span id="Trainer::trainOneDataBatch__s.ArgumentsCR"></span><span class="target" id="paddleclassTrainer_1a16b41a2003f1abff2246a165b15b2096"></span>void <code class="descname">trainOneDataBatch</code><span class="sig-paren">(</span>size_t <em>batchSize</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> &amp;<em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer17trainOneDataBatchE6size_tRK9Arguments" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer15startTestPeriodEv">
<span id="Trainer::startTestPeriod"></span><span class="target" id="paddleclassTrainer_1a002cc420aecf53f2ba3fca2c18734f23"></span>void <code class="descname">startTestPeriod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer15startTestPeriodEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer16testOneDataBatchE6size_tRK9Arguments">
<span id="Trainer::testOneDataBatch__s.ArgumentsCR"></span><span class="target" id="paddleclassTrainer_1ad55cb28f89227bdea7ef384a2ca4d98d"></span>void <code class="descname">testOneDataBatch</code><span class="sig-paren">(</span>size_t <em>batchSize</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> &amp;<em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer16testOneDataBatchE6size_tRK9Arguments" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1645 1646 1647
<dd></dd></dl>

<dl class="function">
1648 1649
<dt id="_CPPv2N7Trainer16finishTestPeriodEv">
<span id="Trainer::finishTestPeriod"></span><span class="target" id="paddleclassTrainer_1a70105c76712d5fbb5619cbd00a3e55f2"></span>void <code class="descname">finishTestPeriod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer16finishTestPeriodEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1650 1651 1652
<dd></dd></dl>

<dl class="function">
1653 1654
<dt id="_CPPv2N7Trainer15forwardOneBatchE6size_t">
<span id="Trainer::forwardOneBatch__s"></span><span class="target" id="paddleclassTrainer_1a89f6b707ffb2a181804ab8a9b2f2cd4b"></span>void <code class="descname">forwardOneBatch</code><span class="sig-paren">(</span>size_t <em>batchSize</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer15forwardOneBatchE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1655 1656 1657
<dd></dd></dl>

<dl class="function">
1658 1659
<dt id="_CPPv2N7Trainer16getForwardOutputEv">
<span id="Trainer::getForwardOutput"></span><span class="target" id="paddleclassTrainer_1ab8d2fb3a8e09e2434557e79ae88947e4"></span><a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> *<code class="descname">getForwardOutput</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer16getForwardOutputEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1660 1661 1662 1663 1664 1665 1666 1667
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N7Trainer14getLayerOutputERKNSt6stringE">
<span id="Trainer::getLayerOutput__ssCR"></span><span class="target" id="paddleclassTrainer_1a619ff54f952ef11f2bcc812288226f8d"></span><a class="reference internal" href="#_CPPv26Matrix" title="Matrix">Matrix</a> *<code class="descname">getLayerOutput</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>layerName</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer14getLayerOutputERKNSt6stringE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1668
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1669 1670 1671
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N7Trainer19createByCommandLineEv">
1672 1673
<span id="Trainer::createByCommandLine"></span><span class="target" id="paddleclassTrainer_1a48c39be2006b3fb010d2990a191e52cf"></span><a class="reference internal" href="#_CPPv27Trainer" title="Trainer">Trainer</a> *<code class="descname">createByCommandLine</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer19createByCommandLineEv" title="Permalink to this definition"></a></dt>
<dd><p>Create A <a class="reference internal" href="#paddleclassTrainer"><span class="std std-ref">Trainer</span></a> By <a class="reference internal" href="#paddleclassTrainerConfig"><span class="std std-ref">TrainerConfig</span></a>. using paddle command line. </p>
Y
Yu Yang 已提交
1674 1675
</dd></dl>

1676 1677 1678 1679 1680
<dl class="function">
<dt id="_CPPv2N7Trainer6createEP13TrainerConfigP15GradientMachine">
<span id="Trainer::create__TrainerConfigP.GradientMachineP"></span><span class="target" id="paddleclassTrainer_1ac2d4da403f1222c5e060b33733a7ebe9"></span><a class="reference internal" href="#_CPPv27Trainer" title="Trainer">Trainer</a> *<code class="descname">create</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv213TrainerConfig" title="TrainerConfig">TrainerConfig</a> *<em>optConfig</em>, <a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a> *<em>gm</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer6createEP13TrainerConfigP15GradientMachine" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1681
</div>
1682
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1683 1684 1685 1686 1687 1688
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N7Trainer7TrainerEv">
<span id="Trainer::Trainer"></span><span class="target" id="paddleclassTrainer_1a62bab4c92f18610f095e5692ba098efe"></span><code class="descname">Trainer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer7TrainerEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

1689 1690 1691 1692 1693
<dl class="function">
<dt id="_CPPv2N7Trainer7TrainerEP13TrainerConfigP15GradientMachine">
<span id="Trainer::Trainer__TrainerConfigP.GradientMachineP"></span><span class="target" id="paddleclassTrainer_1a89501c2aeae2ccc11f8c1f8bc6cb7982"></span><code class="descname">Trainer</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv213TrainerConfig" title="TrainerConfig">TrainerConfig</a> *<em>optConfig</em>, <a class="reference internal" href="#_CPPv215GradientMachine" title="GradientMachine">GradientMachine</a> *<em>gm</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer7TrainerEP13TrainerConfigP15GradientMachine" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

Y
Yu Yang 已提交
1694 1695
<dl class="function">
<dt id="_CPPv2N7Trainer23DISABLE_COPY_AND_ASSIGNE7Trainer">
1696
<span id="Trainer::DISABLE_COPY_AND_ASSIGN__Trainer"></span><span class="target" id="paddleclassTrainer_1a5ac92d995bd64769ae9e76aa0c3e0954"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv27Trainer" title="Trainer">Trainer</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N7Trainer23DISABLE_COPY_AND_ASSIGNE7Trainer" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1697 1698 1699
<dd></dd></dl>

</div>
1700
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N7Trainer1mE">
<span id="Trainer::m__TrainerPrivateP"></span><span class="target" id="paddleclassTrainer_1a6f251fee7a13167435d3d6a7d42d28b5"></span>TrainerPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N7Trainer1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv216ISequenceResults">
<span id="ISequenceResults"></span><span class="target" id="paddleclassISequenceResults"></span><em class="property">class </em><code class="descname">ISequenceResults</code><a class="headerlink" href="#_CPPv216ISequenceResults" title="Permalink to this definition"></a></dt>
1713
<dd><em>#include &lt;PaddleAPI.h&gt;</em><p>the N-Best results generated from one input sequence. </p>
Y
Yu Yang 已提交
1714
<p>Subclassed by PathSequenceResults</p>
1715
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1716 1717 1718
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N16ISequenceResultsD0Ev">
1719
<span id="ISequenceResults::~ISequenceResults"></span><span class="target" id="paddleclassISequenceResults_1a7aae3c79aac8960e8a19ca0b10c21b3f"></span><code class="descname">~ISequenceResults</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N16ISequenceResultsD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1720 1721 1722
<dd></dd></dl>

<dl class="function">
1723 1724
<dt id="_CPPv2NK16ISequenceResults7getSizeEv">
<span id="ISequenceResults::getSizeC"></span><span class="target" id="paddleclassISequenceResults_1a9919a8675c89efa544d9275d3d436a16"></span><em class="property">virtual</em> size_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> = 0<a class="headerlink" href="#_CPPv2NK16ISequenceResults7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1725 1726 1727 1728
<dd><p>Number of result. </p>
</dd></dl>

<dl class="function">
1729 1730
<dt id="_CPPv2NK16ISequenceResults11getSentenceE6size_tb">
<span id="ISequenceResults::getSentence__s.bC"></span><span class="target" id="paddleclassISequenceResults_1a9b54de2900aa94d68202787b2227341c"></span><em class="property">virtual</em> std::string <code class="descname">getSentence</code><span class="sig-paren">(</span>size_t <em>id</em>, bool <em>split</em> = false<span class="sig-paren">)</span> <em class="property">const</em> = 0<a class="headerlink" href="#_CPPv2NK16ISequenceResults11getSentenceE6size_tb" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1731 1732 1733
<dd><p>Get sentence from dictionary.</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1734 1735 1736
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">id</span></code>: the index of result. </li>
<li><code class="docutils literal"><span class="pre">split</span></code>: if true, the return sentence will be splited with &#8216; &#8216; by each word. Default is false. </li>
Y
Yu Yang 已提交
1737 1738 1739 1740 1741 1742 1743
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
1744 1745
<dt id="_CPPv2NK16ISequenceResults11getSequenceE6size_t">
<span id="ISequenceResults::getSequence__sC"></span><span class="target" id="paddleclassISequenceResults_1aa6b23f4cfb4133f8df2c689bab7ceac9"></span><em class="property">virtual</em> std::vector&lt;int&gt; <code class="descname">getSequence</code><span class="sig-paren">(</span>size_t <em>id</em><span class="sig-paren">)</span> <em class="property">const</em> = 0<a class="headerlink" href="#_CPPv2NK16ISequenceResults11getSequenceE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1746 1747 1748
<dd></dd></dl>

<dl class="function">
1749 1750
<dt id="_CPPv2NK16ISequenceResults8getScoreE6size_t">
<span id="ISequenceResults::getScore__sC"></span><span class="target" id="paddleclassISequenceResults_1a9adebfbe9db63aaabba10f7448fdab49"></span><em class="property">virtual</em> float <code class="descname">getScore</code><span class="sig-paren">(</span>size_t <em>id</em><span class="sig-paren">)</span> <em class="property">const</em> = 0<a class="headerlink" href="#_CPPv2NK16ISequenceResults8getScoreE6size_t" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1751 1752 1753 1754 1755 1756 1757 1758
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv217SequenceGenerator">
<span id="SequenceGenerator"></span><span class="target" id="paddleclassSequenceGenerator"></span><em class="property">class </em><code class="descname">SequenceGenerator</code><a class="headerlink" href="#_CPPv217SequenceGenerator" title="Permalink to this definition"></a></dt>
1759
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1760 1761 1762
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N17SequenceGeneratorD0Ev">
1763
<span id="SequenceGenerator::~SequenceGenerator"></span><span class="target" id="paddleclassSequenceGenerator_1a73b695e0f3353100e6476dbac4ab39a4"></span><code class="descname">~SequenceGenerator</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGeneratorD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1764 1765 1766
<dd></dd></dl>

<dl class="function">
1767 1768
<dt id="_CPPv2NK17SequenceGenerator16generateSequenceERK9Arguments">
<span id="SequenceGenerator::generateSequence__ArgumentsCRC"></span><span class="target" id="paddleclassSequenceGenerator_1a94cb6e3283fd11a890e68b8a025b53b7"></span><a class="reference internal" href="#_CPPv216ISequenceResults" title="ISequenceResults">ISequenceResults</a> *<code class="descname">generateSequence</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv29Arguments" title="Arguments">Arguments</a> &amp;<em>inArgs</em><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK17SequenceGenerator16generateSequenceERK9Arguments" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1769 1770 1771
<dd><p>Generate Sequence by input.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
1772 1773 1774
<dd><p class="first">The inArgs is just one sequence of data. </p>
<p class="last">The return will get a N-best generate result by inArgs. Sort by score. </p>
</dd>
Y
Yu Yang 已提交
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator7setDictERKNSt6vectorINSt6stringEEE">
<span id="SequenceGenerator::setDict__std::vector:ss:CR"></span><span class="target" id="paddleclassSequenceGenerator_1a2e0c1e2d5d03597daa34768fc108ccb3"></span>void <code class="descname">setDict</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;std::string&gt; &amp;<em>dict</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator7setDictERKNSt6vectorINSt6stringEEE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator6setBosE6size_t">
<span id="SequenceGenerator::setBos__s"></span><span class="target" id="paddleclassSequenceGenerator_1a4d0962d61d892c42ebe20910484a7ef1"></span>void <code class="descname">setBos</code><span class="sig-paren">(</span>size_t <em>bos</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator6setBosE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator6setEosE6size_t">
<span id="SequenceGenerator::setEos__s"></span><span class="target" id="paddleclassSequenceGenerator_1a4ae4226faeecc583ddd75f4c607e88ce"></span>void <code class="descname">setEos</code><span class="sig-paren">(</span>size_t <em>eos</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator6setEosE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator12setMaxLengthE6size_t">
<span id="SequenceGenerator::setMaxLength__s"></span><span class="target" id="paddleclassSequenceGenerator_1ac1ad503c112f57dd46d87fc95b48abe6"></span>void <code class="descname">setMaxLength</code><span class="sig-paren">(</span>size_t <em>maxlength</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator12setMaxLengthE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator11setBeamSizeE6size_t">
<span id="SequenceGenerator::setBeamSize__s"></span><span class="target" id="paddleclassSequenceGenerator_1a6a5214b63a3c37ab021ce4b7be48ff76"></span>void <code class="descname">setBeamSize</code><span class="sig-paren">(</span>size_t <em>beamSize</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator11setBeamSizeE6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1805
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1806 1807 1808
<p class="breathe-sectiondef-title rubric">Private Functions</p>
<dl class="function">
<dt id="_CPPv2N17SequenceGenerator23DISABLE_COPY_AND_ASSIGNE17SequenceGenerator">
1809
<span id="SequenceGenerator::DISABLE_COPY_AND_ASSIGN__SequenceGenerator"></span><span class="target" id="paddleclassSequenceGenerator_1a422711c0f41d9c72087747c0423199e0"></span><code class="descname">DISABLE_COPY_AND_ASSIGN</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv217SequenceGenerator" title="SequenceGenerator">SequenceGenerator</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator23DISABLE_COPY_AND_ASSIGNE17SequenceGenerator" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1810 1811 1812 1813 1814 1815 1816 1817
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N17SequenceGenerator17SequenceGeneratorEv">
<span id="SequenceGenerator::SequenceGenerator"></span><span class="target" id="paddleclassSequenceGenerator_1a503e39f01279109e59d9574209dcd470"></span><code class="descname">SequenceGenerator</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator17SequenceGeneratorEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1818
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1819 1820 1821 1822 1823 1824 1825
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N17SequenceGenerator1mE">
<span id="SequenceGenerator::m__SequenceGeneratorPrivateP"></span><span class="target" id="paddleclassSequenceGenerator_1a56caef9b925d6335b691799720d4e079"></span>SequenceGeneratorPrivate *<code class="descname">m</code><a class="headerlink" href="#_CPPv2N17SequenceGenerator1mE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1826
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1827 1828 1829
<p class="breathe-sectiondef-title rubric">Private Static Functions</p>
<dl class="function">
<dt id="_CPPv2N17SequenceGenerator32createByGradientMachineSharedPtrEPv">
1830
<span id="SequenceGenerator::createByGradientMachineSharedPtr__voidP"></span><span class="target" id="paddleclassSequenceGenerator_1a7febda20d77a9f7a78718613d6c0c896"></span><a class="reference internal" href="#_CPPv217SequenceGenerator" title="SequenceGenerator">SequenceGenerator</a> *<code class="descname">createByGradientMachineSharedPtr</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N17SequenceGenerator32createByGradientMachineSharedPtrEPv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1831 1832 1833
<dd></dd></dl>

</div>
1834
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1835 1836 1837 1838 1839 1840 1841 1842 1843
<p class="breathe-sectiondef-title rubric">Friends</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassSequenceGenerator_1ab1e2416f07bda51a0f8da259ba54746d"></span><em class="property">friend </em><code class="descname">GradientMachine</code></dt>
<dd></dd></dl>

</div>
</dd></dl>

1844
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">typename</em> T1, <em class="property">typename</em> T2&gt;</dt>
<dt id="_CPPv216staticCastVectorPNSt6vectorI2T2EERKNSt6vectorI2T1EE">
<span id="staticCastVector__std::vector:T2:P.std::vector:T1:CR"></span><span class="target" id="paddleInternal_8h_1a1500dea2fac0d9783b0494bb01855bf0"></span>void <code class="descname">staticCastVector</code><span class="sig-paren">(</span>std::vector&lt;T2&gt; *<em>dest</em>, <em class="property">const</em> std::vector&lt;T1&gt; &amp;<em>src</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv216staticCastVectorPNSt6vectorI2T2EERKNSt6vectorI2T1EE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="../trainer/trainer.html"
                        title="previous chapter">Trainer</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../utils/customStackTrace.html"
                        title="next chapter">CustomStackTrace</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/source/api/api.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
1878 1879
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
Y
Yu Yang 已提交
1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../utils/customStackTrace.html" title="CustomStackTrace"
             >next</a> |</li>
        <li class="right" >
          <a href="../trainer/trainer.html" title="Trainer"
             >previous</a> |</li>
1904 1905
        <li class="nav-item nav-item-0"><a href="../../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >Source Code Documents</a> &#187;</li> 
Y
Yu Yang 已提交
1906 1907 1908
      </ul>
    </div>
    <div class="footer" role="contentinfo">
1909
        &#169; Copyright 2016, PaddlePaddle developers.
1910
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
Y
Yu Yang 已提交
1911 1912 1913
    </div>
  </body>
</html>