dataproviders.html 119.3 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>Data Providers &#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="Data Providers Documents" href="index.html" />
    <link rel="next" title="Evaluators" href="../evaluators/index.html" />
    <link rel="prev" title="Data Providers Documents" href="index.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="../evaluators/index.html" title="Evaluators"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Data Providers Documents"
             accesskey="P">previous</a> |</li>
62 63 64
        <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>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Data Providers Documents</a> &#187;</li> 
Y
Yu Yang 已提交
65 66 67 68 69 70 71 72 73 74
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="data-providers">
<h1>Data Providers<a class="headerlink" href="#data-providers" title="Permalink to this headline"></a></h1>
Y
Yu Yang 已提交
75 76
<div class="section" id="base-dataprovider">
<h2>Base DataProvider<a class="headerlink" href="#base-dataprovider" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
77 78
<dl class="class">
<dt id="_CPPv2N6paddle12DataProviderE">
Y
Yu Yang 已提交
79
<span id="paddle::DataProvider"></span><span class="target" id="paddleclasspaddle_1_1DataProvider"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">DataProvider</code><a class="headerlink" href="#_CPPv2N6paddle12DataProviderE" title="Permalink to this definition"></a></dt>
80
<dd><p>Base class for <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">DataProvider</span></a>, which supplies data for training. </p>
Y
Yu Yang 已提交
81 82 83 84 85
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>It can supplies multiple streams of data. For typical supervised training, there are two streams: one is for input, one is for label. </dd>
</dl>
</p>
86
<p>Subclassed by <a class="reference internal" href="#paddleclasspaddle_1_1DataProviderGroup"><span class="std std-ref">paddle::DataProviderGroup&lt; T &gt;</span></a>, paddle::DummyDataProvider, <a class="reference internal" href="#paddleclasspaddle_1_1MultiDataProvider"><span class="std std-ref">paddle::MultiDataProvider</span></a>, <a class="reference internal" href="#paddleclasspaddle_1_1ProtoDataProvider"><span class="std std-ref">paddle::ProtoDataProvider</span></a>, paddle::PyDataProvider, <a class="reference internal" href="#paddleclasspaddle_1_1PyDataProvider2"><span class="std std-ref">paddle::PyDataProvider2</span></a>, paddle::SimpleDataProviderBase</p>
87
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
88 89 90 91 92 93 94 95
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider12DataProviderERK10DataConfigb">
<span id="paddle::DataProvider::DataProvider__DataConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a1d4d25a193d3b5d0cf53290397433bae"></span><code class="descname">DataProvider</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, bool <em>useGpu</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider12DataProviderERK10DataConfigb" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProviderD0Ev">
96
<span id="paddle::DataProvider::~DataProvider"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1ad2a097382fe910162dbc4a463c048ed3"></span><em class="property">virtual</em> <code class="descname">~DataProvider</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProviderD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
97 98 99
<dd></dd></dl>

<dl class="function">
100 101
<dt id="_CPPv2NK6paddle12DataProvider9getConfigEv">
<span id="paddle::DataProvider::getConfigC"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1ad10ab1112a6af0e1f84c335c56df8252"></span><em class="property">const</em> DataConfig &amp;<code class="descname">getConfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6paddle12DataProvider9getConfigEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
102 103 104 105 106 107 108 109 110
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider14setSkipShuffleEv">
<span id="paddle::DataProvider::setSkipShuffle"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a3fb79f4e6f497de18710bfbd2cd7eea4"></span>void <code class="descname">setSkipShuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider14setSkipShuffleEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider12getNextBatchE7int64_tP9DataBatch">
Y
Yu Yang 已提交
111 112 113 114 115 116
<span id="paddle::DataProvider::getNextBatch__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a98d9d269b628ac7c8354a8a7de049a7b"></span>int64_t <code class="descname">getNextBatch</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider12getNextBatchE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
<dd><p>Get next batch of training samples. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
117 118 119
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
120 121 122 123 124
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
125 126 127

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider7shuffleEv">
128
<span id="paddle::DataProvider::shuffle"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a7b05642e64f7ed4c15e7b82aa93ac38a"></span><em class="property">virtual</em> void <code class="descname">shuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle12DataProvider7shuffleEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
129
<dd><p>Shuffle the data set. </p>
Y
Yu Yang 已提交
130 131 132 133
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider5resetEv">
134
<span id="paddle::DataProvider::reset"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"></span><em class="property">virtual</em> void <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider5resetEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
135 136 137
<dd><p>reset all the value of index </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
138
<dd><a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">reset()</span></a> must be called before any calls to <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a98d9d269b628ac7c8354a8a7de049a7b"><span class="std std-ref">getNextBatch()</span></a> IMPORTANT: subclass <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">reset()</span></a> should always call the base class <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">reset()</span></a> at the end of the function </dd>
Y
Yu Yang 已提交
139 140
</dl>
</p>
Y
Yu Yang 已提交
141 142 143 144
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider7getSizeEv">
145
<span id="paddle::DataProvider::getSize"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a383104e591e2f95f959bbf45c4d06b2e"></span><em class="property">virtual</em> int64_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle12DataProvider7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
146 147 148 149 150 151 152 153
<dd><p>Get the size of training samples. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>the number of training samples in the data set. </dd>
<dt><strong>Note</strong></dt>
<dd>return -1 to indicate unlimited number of samples. </dd>
</dl>
</p>
Y
Yu Yang 已提交
154 155 156 157
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider20getNextBatchInternalE7int64_tP9DataBatch">
158
<span id="paddle::DataProvider::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a1d3a1c543b75c35e2e290512ccd2700f"></span><em class="property">virtual</em> int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle12DataProvider20getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
159 160 161 162 163
<dd><p>Get next batch training samples internally. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
164 165 166
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
167 168 169 170 171
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
172 173

</div>
174
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
175 176
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
177 178
<dt id="_CPPv2N6paddle12DataProvider6createERK10DataConfigRK11ModelConfigb">
<span id="paddle::DataProvider::create__DataConfigCR.ModelConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a761ef962e6ef45b14562632db6be39c9"></span><a class="reference internal" href="#_CPPv2N6paddle12DataProviderE" title="paddle::DataProvider">DataProvider</a> *<code class="descname">create</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, <em class="property">const</em> <a class="reference internal" href="../../api/api.html#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a> &amp;<em>modelConfig</em>, bool <em>useGpu</em> = FLAGS_use_gpu<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider6createERK10DataConfigRK11ModelConfigb" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
179 180
<dd></dd></dl>

181 182
<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider6createERK10DataConfigb">
183
<span id="paddle::DataProvider::create__DataConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a3eb1d0e7dcb32e4e9b1271c7d745706a"></span><em class="property">static</em> <a class="reference internal" href="#_CPPv2N6paddle12DataProviderE" title="paddle::DataProvider">DataProvider</a> *<code class="descname">create</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, bool <em>useGpu</em> = FLAGS_use_gpu<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider6createERK10DataConfigb" title="Permalink to this definition"></a></dt>
184 185 186
<dd><p>create only used for unittest. </p>
</dd></dl>

Y
Yu Yang 已提交
187
</div>
188
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
189 190 191
<p class="breathe-sectiondef-title rubric">Public Static Attributes</p>
<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider10registrar_E">
192
<span id="paddle::DataProvider::registrar___ClassRegistrar:DataProvider.DataConfig.ModelConfig.b:"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1ae40e5169aa51da3fb0e903ff75b8ab01"></span>ClassRegistrar&lt;<a class="reference internal" href="#_CPPv2N6paddle12DataProviderE" title="paddle::DataProvider">DataProvider</a>, DataConfig, <a class="reference internal" href="../../api/api.html#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a>, bool&gt; <code class="descname">registrar_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider10registrar_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
193 194 195
<dd></dd></dl>

</div>
196
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
197 198 199
<p class="breathe-sectiondef-title rubric">Protected Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider22getNextBatchFromBufferE7int64_tP9DataBatch">
Y
Yu Yang 已提交
200 201 202 203 204
<span id="paddle::DataProvider::getNextBatchFromBuffer__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a6b4a1d3ef66863f840e1ab5bafd8e2df"></span>int64_t <code class="descname">getNextBatchFromBuffer</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider22getNextBatchFromBufferE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
<dd><p>&#64;brief Get next batch training samples from buffer <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
205 206 207
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
208 209 210 211 212
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
213 214 215 216 217 218 219

<dl class="function">
<dt id="_CPPv2N6paddle12DataProvider15initAsyncLoaderEv">
<span id="paddle::DataProvider::initAsyncLoader"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1abf5599ca341b48aa2e773637952b2c78"></span>void <code class="descname">initAsyncLoader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DataProvider15initAsyncLoaderEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
220
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider7config_E">
<span id="paddle::DataProvider::config___DataConfig"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1ade224ccf5a10c5e523bdab8332a677f4"></span>DataConfig <code class="descname">config_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider7config_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider12skipShuffle_E">
<span id="paddle::DataProvider::skipShuffle___b"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a94c94d06d7c86c992a409aa05587b9dc"></span>bool <code class="descname">skipShuffle_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider12skipShuffle_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider11usageRatio_E">
<span id="paddle::DataProvider::usageRatio___float"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1ae7c9e19a48fbc9e6fa80ce18813f9ac5"></span>float <code class="descname">usageRatio_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider11usageRatio_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider7useGpu_E">
<span id="paddle::DataProvider::useGpu___b"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1adbf7a324580b811c2cbf0caa1ee08909"></span>bool <code class="descname">useGpu_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider7useGpu_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider13doubleBuffer_E">
Y
Yu Yang 已提交
244
<span id="paddle::DataProvider::doubleBuffer___std::unique_ptr:DoubleBuffer:"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1a9e5acdbe6a91bc1c3e9e191762172194"></span>std::unique_ptr&lt;DoubleBuffer&gt; <code class="descname">doubleBuffer_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider13doubleBuffer_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
245 246 247 248 249 250 251 252 253 254
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle12DataProvider14constantSlots_E">
<span id="paddle::DataProvider::constantSlots___ThreadLocal:std::vector:MatrixPtr::"></span><span class="target" id="paddleclasspaddle_1_1DataProvider_1aafd0f8405d4a257910d5825234708a90"></span>ThreadLocal&lt;std::vector&lt;<a class="reference internal" href="../../math/matrix/matrix.html#_CPPv2N6paddle9MatrixPtrE" title="paddle::MatrixPtr">MatrixPtr</a>&gt;&gt; <code class="descname">constantSlots_</code><a class="headerlink" href="#_CPPv2N6paddle12DataProvider14constantSlots_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

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

Y
Yu Yang 已提交
255 256 257
</div>
<div class="section" id="dataprovidergroup">
<h2>DataProviderGroup<a class="headerlink" href="#dataprovidergroup" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
258
<dl class="class">
Y
Yu Yang 已提交
259 260 261 262
<dt>
<span class="target" id="paddleclasspaddle_1_1DataProviderGroup"></span><em class="property">template </em>&lt;<em class="property">class</em> T&gt;</dt>
<dt id="_CPPv2N6paddle17DataProviderGroupE">
<span id="paddle::DataProviderGroup"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">DataProviderGroup</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroupE" title="Permalink to this definition"></a></dt>
263
<dd><p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">paddle::DataProvider</span></a></p>
264
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
265 266
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
Y
Yu Yang 已提交
267 268
<dt id="_CPPv2N6paddle17DataProviderGroup17DataProviderGroupERK10DataConfigb">
<span id="paddle::DataProviderGroup::DataProviderGroup__DataConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1aa0e72492025f4cb272fd2f53c14ec7b1"></span><code class="descname">DataProviderGroup</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, bool <em>useGpu</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup17DataProviderGroupERK10DataConfigb" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
269 270 271
<dd></dd></dl>

<dl class="function">
Y
Yu Yang 已提交
272 273
<dt id="_CPPv2N6paddle17DataProviderGroupD0Ev">
<span id="paddle::DataProviderGroup::~DataProviderGroup"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1abfb0b691ac6a4d07a92949b6ea4d5ae9"></span><code class="descname">~DataProviderGroup</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroupD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
274 275 276
<dd></dd></dl>

<dl class="function">
Y
Yu Yang 已提交
277
<dt id="_CPPv2N6paddle17DataProviderGroup5resetEv">
278
<span id="paddle::DataProviderGroup::reset"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1aabc5a09dd7b80a8616108fb2f2989c21"></span>void <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup5resetEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
279 280 281
<dd><p>reset all the value of index </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
282
<dd><a class="reference internal" href="#paddleclasspaddle_1_1DataProviderGroup_1aabc5a09dd7b80a8616108fb2f2989c21"><span class="std std-ref">reset()</span></a> must be called before any calls to <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a98d9d269b628ac7c8354a8a7de049a7b"><span class="std std-ref">getNextBatch()</span></a> IMPORTANT: subclass <a class="reference internal" href="#paddleclasspaddle_1_1DataProviderGroup_1aabc5a09dd7b80a8616108fb2f2989c21"><span class="std std-ref">reset()</span></a> should always call the base class <a class="reference internal" href="#paddleclasspaddle_1_1DataProviderGroup_1aabc5a09dd7b80a8616108fb2f2989c21"><span class="std std-ref">reset()</span></a> at the end of the function </dd>
Y
Yu Yang 已提交
283 284 285
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
286 287

<dl class="function">
Y
Yu Yang 已提交
288
<dt id="_CPPv2N6paddle17DataProviderGroup7shuffleEv">
289
<span id="paddle::DataProviderGroup::shuffle"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1af5d1ad23716d3d4734917d28e7a93140"></span><em class="property">virtual</em> void <code class="descname">shuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup7shuffleEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
290 291
<dd><p>Shuffle the data set. </p>
</dd></dl>
Y
Yu Yang 已提交
292 293

<dl class="function">
Y
Yu Yang 已提交
294
<dt id="_CPPv2N6paddle17DataProviderGroup7getSizeEv">
295
<span id="paddle::DataProviderGroup::getSize"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1a0e3e36653942aaf01670f37127b06a4f"></span><em class="property">virtual</em> int64_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
296 297 298 299 300 301 302 303 304
<dd><p>Get the size of training samples. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>the number of training samples in the data set. </dd>
<dt><strong>Note</strong></dt>
<dd>return -1 to indicate unlimited number of samples. </dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
305 306

<dl class="function">
Y
Yu Yang 已提交
307
<dt id="_CPPv2N6paddle17DataProviderGroup20getNextBatchInternalE7int64_tP9DataBatch">
308
<span id="paddle::DataProviderGroup::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1a1de57dd0c862ee3b9727afa905f56de8"></span>int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup20getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
309 310 311 312 313
<dd><p>Get next batch training samples internally. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
314 315 316
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
317 318 319 320 321
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
322 323

</div>
324
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
325 326 327 328
<p class="breathe-sectiondef-title rubric">Protected Types</p>
<dl class="type">
<dt id="_CPPv2N6paddle17DataProviderGroup12ProviderTypeE">
<span id="paddle::DataProviderGroup::ProviderType"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1af521f88c5a303510f05bd9c7fd8fc130"></span><em class="property">typedef </em>T <code class="descname">ProviderType</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup12ProviderTypeE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
329 330
<dd></dd></dl>

Y
Yu Yang 已提交
331 332 333
<dl class="type">
<dt id="_CPPv2N6paddle17DataProviderGroup15ProviderPtrTypeE">
<span id="paddle::DataProviderGroup::ProviderPtrType"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1a9eeae52d64d56199a679da2d683a9fcb"></span><em class="property">typedef </em>std::shared_ptr&lt;<a class="reference internal" href="#_CPPv2N6paddle17DataProviderGroup12ProviderTypeE" title="paddle::DataProviderGroup::ProviderType">ProviderType</a>&gt; <code class="descname">ProviderPtrType</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup15ProviderPtrTypeE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
334 335 336
<dd></dd></dl>

</div>
337
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
338 339
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
<dl class="member">
Y
Yu Yang 已提交
340 341
<dt id="_CPPv2N6paddle17DataProviderGroup9provider_E">
<span id="paddle::DataProviderGroup::provider___ProviderPtrType"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1ad8eca96f9a38a42296e26ca338eb1ad8"></span><a class="reference internal" href="#_CPPv2N6paddle17DataProviderGroup15ProviderPtrTypeE" title="paddle::DataProviderGroup::ProviderPtrType">ProviderPtrType</a> <code class="descname">provider_</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup9provider_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
342 343 344
<dd></dd></dl>

<dl class="member">
Y
Yu Yang 已提交
345 346
<dt id="_CPPv2N6paddle17DataProviderGroup9fileList_E">
<span id="paddle::DataProviderGroup::fileList___std::vector:ss:"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1a90d4a9e3d5aa8f3209b9e77c867ebdf2"></span>std::vector&lt;std::string&gt; <code class="descname">fileList_</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup9fileList_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
347 348 349
<dd></dd></dl>

<dl class="member">
Y
Yu Yang 已提交
350 351
<dt id="_CPPv2N6paddle17DataProviderGroup5lock_E">
<span id="paddle::DataProviderGroup::lock___std::mutex"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1ad26ce9c43110f9b9981903d0d344e346"></span>std::mutex <code class="descname">lock_</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup5lock_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
352 353 354
<dd></dd></dl>

<dl class="member">
Y
Yu Yang 已提交
355 356
<dt id="_CPPv2N6paddle17DataProviderGroup7loader_E">
<span id="paddle::DataProviderGroup::loader___std::unique_ptr:MultiThreadWorker:ProviderType::"></span><span class="target" id="paddleclasspaddle_1_1DataProviderGroup_1aaa3059ba5b19c13b32ae58836b9162b7"></span>std::unique_ptr&lt;<a class="reference internal" href="../../utils/lock.html#_CPPv2N6paddle17MultiThreadWorkerE" title="paddle::MultiThreadWorker">MultiThreadWorker</a>&lt;<a class="reference internal" href="#_CPPv2N6paddle17DataProviderGroup12ProviderTypeE" title="paddle::DataProviderGroup::ProviderType">ProviderType</a>&gt;&gt; <code class="descname">loader_</code><a class="headerlink" href="#_CPPv2N6paddle17DataProviderGroup7loader_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
357 358
<dd></dd></dl>

Y
Yu Yang 已提交
359 360
</div>
</dd></dl>
Y
Yu Yang 已提交
361 362

</div>
Y
Yu Yang 已提交
363 364 365 366 367
<div class="section" id="multidataprovider">
<h2>MultiDataProvider<a class="headerlink" href="#multidataprovider" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle17MultiDataProviderE">
<span id="paddle::MultiDataProvider"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">MultiDataProvider</code><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProviderE" title="Permalink to this definition"></a></dt>
368
<dd><p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">paddle::DataProvider</span></a></p>
369
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
370 371
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
372 373
<dt id="_CPPv2N6paddle17MultiDataProvider17MultiDataProviderERK10DataConfigRK11ModelConfigb">
<span id="paddle::MultiDataProvider::MultiDataProvider__DataConfigCR.ModelConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1acd993858e31a0f829e7ca3034bcdb655"></span><code class="descname">MultiDataProvider</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, <em class="property">const</em> <a class="reference internal" href="../../api/api.html#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a> &amp;<em>modelConfig</em>, bool <em>useGpu</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider17MultiDataProviderERK10DataConfigRK11ModelConfigb" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
374 375 376
<dd></dd></dl>

<dl class="function">
Y
Yu Yang 已提交
377 378 379 380 381 382
<dt id="_CPPv2N6paddle17MultiDataProviderD0Ev">
<span id="paddle::MultiDataProvider::~MultiDataProvider"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1a4059bdb3be2b2cf7d99dd740cea31161"></span><code class="descname">~MultiDataProvider</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProviderD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17MultiDataProvider5resetEv">
383
<span id="paddle::MultiDataProvider::reset"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1aa10250fd3fbeb5dadcb42c7c968b7fdf"></span>void <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider5resetEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
384
<dd><p>reset all the value of index </p>
Y
Yu Yang 已提交
385 386
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
387
<dd><a class="reference internal" href="#paddleclasspaddle_1_1MultiDataProvider_1aa10250fd3fbeb5dadcb42c7c968b7fdf"><span class="std std-ref">reset()</span></a> must be called before any calls to <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a98d9d269b628ac7c8354a8a7de049a7b"><span class="std std-ref">getNextBatch()</span></a> IMPORTANT: subclass <a class="reference internal" href="#paddleclasspaddle_1_1MultiDataProvider_1aa10250fd3fbeb5dadcb42c7c968b7fdf"><span class="std std-ref">reset()</span></a> should always call the base class <a class="reference internal" href="#paddleclasspaddle_1_1MultiDataProvider_1aa10250fd3fbeb5dadcb42c7c968b7fdf"><span class="std std-ref">reset()</span></a> at the end of the function </dd>
Y
Yu Yang 已提交
388 389 390 391 392
</dl>
</p>
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
393
<dt id="_CPPv2N6paddle17MultiDataProvider7shuffleEv">
394
<span id="paddle::MultiDataProvider::shuffle"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1ac323b8ff3a8e8c1234b42a20d1e05311"></span>void <code class="descname">shuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider7shuffleEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
395
<dd><p>Shuffle the data set. </p>
Y
Yu Yang 已提交
396 397 398
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
399
<dt id="_CPPv2N6paddle17MultiDataProvider7getSizeEv">
400
<span id="paddle::MultiDataProvider::getSize"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1a81a7c862be871db62ae94ab81012fc69"></span><em class="property">virtual</em> int64_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
401 402
<dd><p>Get the size of training samples. </p>
<p><dl class="docutils">
Y
Yu Yang 已提交
403
<dt><strong>Return</strong></dt>
Y
Yu Yang 已提交
404 405 406
<dd>the number of training samples in the data set. </dd>
<dt><strong>Note</strong></dt>
<dd>return -1 to indicate unlimited number of samples. </dd>
Y
Yu Yang 已提交
407 408 409 410 411
</dl>
</p>
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
412
<dt id="_CPPv2N6paddle17MultiDataProvider20getNextBatchInternalE7int64_tP9DataBatch">
413
<span id="paddle::MultiDataProvider::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1a2d07eb0ce8a35f61e7784bbfc5033f83"></span>int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider20getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
414 415 416 417
<dd><p>Get next batch training samples internally. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
Y
Yu Yang 已提交
418
<dt><strong>Parameters</strong></dt>
419 420 421
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
422 423 424 425 426 427 428
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
429 430
<dt id="_CPPv2NK6paddle17MultiDataProvider10isTestModeEv">
<span id="paddle::MultiDataProvider::isTestModeC"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1a9df5d1af13a8bb15ad3c7e469c3a2a31"></span>bool <code class="descname">isTestMode</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6paddle17MultiDataProvider10isTestModeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
431
<dd></dd></dl>
Y
Yu Yang 已提交
432 433

</div>
434
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
435 436 437 438 439
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
<dl class="member">
<dt id="_CPPv2N6paddle17MultiDataProvider17subDataProviders_E">
<span id="paddle::MultiDataProvider::subDataProviders___std::vector:std::unique_ptr:DataProvider::"></span><span class="target" id="paddleclasspaddle_1_1MultiDataProvider_1a679fbbbf8b7268546f5486f92a230008"></span>std::vector&lt;std::unique_ptr&lt;<a class="reference internal" href="#_CPPv2N6paddle12DataProviderE" title="paddle::DataProvider">DataProvider</a>&gt;&gt; <code class="descname">subDataProviders_</code><a class="headerlink" href="#_CPPv2N6paddle17MultiDataProvider17subDataProviders_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
Y
Yu Yang 已提交
440 441 442 443

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

Y
Yu Yang 已提交
444 445 446 447 448 449
</div>
</div>
<div class="section" id="pydataprovider">
<h1>PyDataProvider<a class="headerlink" href="#pydataprovider" title="Permalink to this headline"></a></h1>
<div class="section" id="ifieldscanner">
<h2>IFieldScanner<a class="headerlink" href="#ifieldscanner" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
450
<dl class="class">
Y
Yu Yang 已提交
451 452 453 454
<dt id="_CPPv2N6paddle13IFieldScannerE">
<span id="paddle::IFieldScanner"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">IFieldScanner</code><a class="headerlink" href="#_CPPv2N6paddle13IFieldScannerE" title="Permalink to this definition"></a></dt>
<dd><p>FieldScanner Interface.</p>
<p>It will read python object, and fill to argument&#8217;s each slot. There are two steps, prepare and fill. Scanner will alloc memory during prepare step, fill data into argument during fill step. </p>
455
<p>Subclassed by <a class="reference internal" href="#paddleclasspaddle_1_1DenseScanner"><span class="std std-ref">paddle::DenseScanner</span></a>, <a class="reference internal" href="#paddleclasspaddle_1_1IndexScanner"><span class="std std-ref">paddle::IndexScanner</span></a>, paddle::SequenceScanner, <a class="reference internal" href="#paddleclasspaddle_1_1SparseNonValueScanner"><span class="std std-ref">paddle::SparseNonValueScanner</span></a></p>
456
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
457 458
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
Y
Yu Yang 已提交
459
<dt id="_CPPv2N6paddle13IFieldScanner12DISABLE_COPYE13IFieldScanner">
460
<span id="paddle::IFieldScanner::DISABLE_COPY__IFieldScanner"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1adfc54719dfd3ceb3a187d2fa8d5997b9"></span><code class="descname">DISABLE_COPY</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv2N6paddle13IFieldScannerE" title="paddle::IFieldScanner">IFieldScanner</a><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner12DISABLE_COPYE13IFieldScanner" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
461
<dd></dd></dl>
Y
Yu Yang 已提交
462 463

<dl class="function">
Y
Yu Yang 已提交
464 465 466
<dt id="_CPPv2N6paddle13IFieldScanner13IFieldScannerEP10SlotHeader">
<span id="paddle::IFieldScanner::IFieldScanner__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a852d54211b136d42eea1ec98235e6b38"></span><code class="descname">IFieldScanner</code><span class="sig-paren">(</span>SlotHeader *<em>headerPtr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner13IFieldScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
<dd><p>Ctor. <dl class="docutils">
Y
Yu Yang 已提交
467
<dt><strong>Parameters</strong></dt>
468 469
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">headerPtr</span></code>: slot header that scanner belong to. </li>
Y
Yu Yang 已提交
470 471 472 473 474 475 476
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
477
<dt id="_CPPv2N6paddle13IFieldScannerD0Ev">
478
<span id="paddle::IFieldScanner::~IFieldScanner"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a2694874652e8c7e8702794cc85ea0d2c"></span><em class="property">virtual</em> <code class="descname">~IFieldScanner</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScannerD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
479
<dd></dd></dl>
Y
Yu Yang 已提交
480 481

<dl class="function">
Y
Yu Yang 已提交
482
<dt id="_CPPv2N6paddle13IFieldScanner12startPrepareER8Argument">
483
<span id="paddle::IFieldScanner::startPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a59f2d475c6b12f6824cdaa3453e1ac49"></span><em class="property">virtual</em> void <code class="descname">startPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner12startPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
484
<dd><p>Start prepare step. </p>
Y
Yu Yang 已提交
485 486 487
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
488
<dt id="_CPPv2N6paddle13IFieldScanner7prepareER8ArgumentP8PyObject">
489
<span id="paddle::IFieldScanner::prepare__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1aec5e4919e2b2946094dc3f75a7d17f08"></span><em class="property">virtual</em> void <code class="descname">prepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner7prepareER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
490 491
<dd><p>Prepare step.</p>
<p><dl class="docutils">
Y
Yu Yang 已提交
492
<dt><strong>Note</strong></dt>
Y
Yu Yang 已提交
493
<dd>the obj could be a timestep of sample or whole sample. It depends what scanner it is. </dd>
Y
Yu Yang 已提交
494 495 496 497 498
</dl>
</p>
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
499
<dt id="_CPPv2N6paddle13IFieldScanner13finishPrepareER8Argument">
500
<span id="paddle::IFieldScanner::finishPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1ac648c8047ffd873ffbf5d889cf3565e5"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
501
<dd><p>Finish Prepare step. </p>
Y
Yu Yang 已提交
502 503 504
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
505
<dt id="_CPPv2N6paddle13IFieldScanner9startFillER8Argument">
506
<span id="paddle::IFieldScanner::startFill__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1ae0c654543ef8e863473afcbcf34a5a1f"></span><em class="property">virtual</em> void <code class="descname">startFill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner9startFillER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
507
<dd><p>Start fill step. </p>
Y
Yu Yang 已提交
508 509 510
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
511
<dt id="_CPPv2N6paddle13IFieldScanner4fillER8ArgumentP8PyObject">
512
<span id="paddle::IFieldScanner::fill__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a46f052af1bcb4ade0f8caa752efb4202"></span><em class="property">virtual</em> void <code class="descname">fill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner4fillER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
513 514 515 516 517 518
<dd><p>Fill step.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>the obj could be a timestep of sample or whole sample. It depends what scanner it is. </dd>
</dl>
</p>
Y
Yu Yang 已提交
519 520 521
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
522
<dt id="_CPPv2N6paddle13IFieldScanner10finishFillER8Argument">
523
<span id="paddle::IFieldScanner::finishFill__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a511c98382488cb8fc0b6fb10632f6d5c"></span><em class="property">virtual</em> void <code class="descname">finishFill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner10finishFillER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
524
<dd><p>Finish fill step. </p>
Y
Yu Yang 已提交
525 526 527
</dd></dl>

</div>
528
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
529
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
Y
Yu Yang 已提交
530
<dl class="function">
Y
Yu Yang 已提交
531
<dt id="_CPPv2N6paddle13IFieldScanner6createEP10SlotHeader">
532
<span id="paddle::IFieldScanner::create__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1aa8355363cd6d835eee64389c96a3835f"></span><a class="reference internal" href="#_CPPv2N6paddle13IFieldScannerE" title="paddle::IFieldScanner">IFieldScanner</a> *<code class="descname">create</code><span class="sig-paren">(</span>SlotHeader *<em>header</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner6createEP10SlotHeader" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
533 534 535 536 537 538 539
<dd><p>Factory method. Create a scanner by header. The final scanner may be combine many scanners.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>Fatal if header is not support. </dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
540 541

</div>
542
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
543
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
Y
Yu Yang 已提交
544
<dl class="member">
Y
Yu Yang 已提交
545 546
<dt id="_CPPv2N6paddle13IFieldScanner10headerPtr_E">
<span id="paddle::IFieldScanner::headerPtr___SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1IFieldScanner_1a83273be720a6cd9c8c0e264f6b06b05a"></span>SlotHeader *<code class="descname">headerPtr_</code><a class="headerlink" href="#_CPPv2N6paddle13IFieldScanner10headerPtr_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
547 548 549 550 551
<dd></dd></dl>

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

Y
Yu Yang 已提交
552 553 554
</div>
<div class="section" id="densescanner">
<h2>DenseScanner<a class="headerlink" href="#densescanner" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
555
<dl class="class">
Y
Yu Yang 已提交
556 557 558
<dt id="_CPPv2N6paddle12DenseScannerE">
<span id="paddle::DenseScanner"></span><span class="target" id="paddleclasspaddle_1_1DenseScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">DenseScanner</code><a class="headerlink" href="#_CPPv2N6paddle12DenseScannerE" title="Permalink to this definition"></a></dt>
<dd><p>Scanner for dense slot. </p>
559
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1IFieldScanner"><span class="std std-ref">paddle::IFieldScanner</span></a></p>
560
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
561 562
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
Y
Yu Yang 已提交
563 564 565 566 567 568
<dt id="_CPPv2N6paddle12DenseScanner12DenseScannerEP10SlotHeader">
<span id="paddle::DenseScanner::DenseScanner__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1DenseScanner_1aa04defb9f71f17c03d2fac593473817e"></span><code class="descname">DenseScanner</code><span class="sig-paren">(</span>SlotHeader *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DenseScanner12DenseScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle12DenseScanner7prepareER8ArgumentP8PyObject">
569
<span id="paddle::DenseScanner::prepare__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1DenseScanner_1a06f5357ef4905bac34c23049767930c9"></span><em class="property">virtual</em> void <code class="descname">prepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DenseScanner7prepareER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
570
<dd><p>Prepare. <dl class="docutils">
Y
Yu Yang 已提交
571
<dt><strong>Parameters</strong></dt>
572 573 574
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">argument</span></code>: target argument </li>
<li><code class="docutils literal"><span class="pre">obj</span></code>: each timestep of a sample. </li>
Y
Yu Yang 已提交
575 576 577 578 579 580 581
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
582
<dt id="_CPPv2N6paddle12DenseScanner13finishPrepareER8Argument">
583
<span id="paddle::DenseScanner::finishPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1DenseScanner_1a1ef079c5bd06c0d6cb1168a677c74a89"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DenseScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
584
<dd><p>Finish Prepare step. </p>
Y
Yu Yang 已提交
585 586 587
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
588
<dt id="_CPPv2N6paddle12DenseScanner4fillER8ArgumentP8PyObject">
589
<span id="paddle::DenseScanner::fill__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1DenseScanner_1ac0475d4c0541363c0d9429ea6d0da79b"></span><em class="property">virtual</em> void <code class="descname">fill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12DenseScanner4fillER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
590 591
<dd><p>Fill argument from obj. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
592 593 594
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">argument</span></code>: </li>
<li><code class="docutils literal"><span class="pre">obj</span></code>: </li>
Y
Yu Yang 已提交
595 596 597 598
</ul>
</dd>
</dl>
</p>
Y
Yu Yang 已提交
599 600
</dd></dl>

Y
Yu Yang 已提交
601
</div>
Y
Yu Yang 已提交
602 603
</dd></dl>

Y
Yu Yang 已提交
604 605 606 607 608 609 610
</div>
<div class="section" id="indexscanner">
<h2>IndexScanner<a class="headerlink" href="#indexscanner" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle12IndexScannerE">
<span id="paddle::IndexScanner"></span><span class="target" id="paddleclasspaddle_1_1IndexScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">IndexScanner</code><a class="headerlink" href="#_CPPv2N6paddle12IndexScannerE" title="Permalink to this definition"></a></dt>
<dd><p>Scanner for index slot </p>
611
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1IFieldScanner"><span class="std std-ref">paddle::IFieldScanner</span></a></p>
612
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
613
<p class="breathe-sectiondef-title rubric">Public Functions</p>
Y
Yu Yang 已提交
614
<dl class="function">
Y
Yu Yang 已提交
615 616 617
<dt id="_CPPv2N6paddle12IndexScanner12IndexScannerEP10SlotHeader">
<span id="paddle::IndexScanner::IndexScanner__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1IndexScanner_1ad0b7cd33f0edabf30b5c99196f18fe01"></span><code class="descname">IndexScanner</code><span class="sig-paren">(</span>SlotHeader *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12IndexScanner12IndexScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
Y
Yu Yang 已提交
618 619

<dl class="function">
Y
Yu Yang 已提交
620
<dt id="_CPPv2N6paddle12IndexScanner7prepareER8ArgumentP8PyObject">
621
<span id="paddle::IndexScanner::prepare__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1IndexScanner_1af16d91e8a204fc660a9cbe45eec5310f"></span><em class="property">virtual</em> void <code class="descname">prepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12IndexScanner7prepareER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
622 623 624 625 626 627
<dd><p>Prepare memory space.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>obj is a single timestep of sample </dd>
</dl>
</p>
Y
Yu Yang 已提交
628 629 630
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
631
<dt id="_CPPv2N6paddle12IndexScanner13finishPrepareER8Argument">
632
<span id="paddle::IndexScanner::finishPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1IndexScanner_1ae5f5314bd4dc869a8ba4dd33b3b57d43"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12IndexScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
633
<dd><p>Finish Prepare step. </p>
Y
Yu Yang 已提交
634 635 636
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
637
<dt id="_CPPv2N6paddle12IndexScanner4fillER8ArgumentP8PyObject">
638
<span id="paddle::IndexScanner::fill__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1IndexScanner_1afa4763633db79aa535970cb60ed2c4a1"></span><em class="property">virtual</em> void <code class="descname">fill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle12IndexScanner4fillER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
639
<dd><p>Fill one index to argument. </p>
Y
Yu Yang 已提交
640 641 642 643 644
</dd></dl>

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

Y
Yu Yang 已提交
645 646 647
</div>
<div class="section" id="sparsenonvaluescanner">
<h2>SparseNonValueScanner<a class="headerlink" href="#sparsenonvaluescanner" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
648 649
<dl class="class">
<dt id="_CPPv2N6paddle21SparseNonValueScannerE">
Y
Yu Yang 已提交
650
<span id="paddle::SparseNonValueScanner"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">SparseNonValueScanner</code><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScannerE" title="Permalink to this definition"></a></dt>
651
<dd><p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1IFieldScanner"><span class="std std-ref">paddle::IFieldScanner</span></a></p>
Y
Yu Yang 已提交
652
<p>Subclassed by paddle::SparseValueScanner</p>
653
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
654 655 656
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner21SparseNonValueScannerEP10SlotHeader">
Y
Yu Yang 已提交
657
<span id="paddle::SparseNonValueScanner::SparseNonValueScanner__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1a34df14f1ab333000b0ebc439f895c348"></span><code class="descname">SparseNonValueScanner</code><span class="sig-paren">(</span>SlotHeader *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner21SparseNonValueScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
658 659 660 661
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner7prepareER8ArgumentP8PyObject">
662
<span id="paddle::SparseNonValueScanner::prepare__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1a3e7f7690a43bba59b8ef795754664f8b"></span><em class="property">virtual</em> void <code class="descname">prepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner7prepareER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
663 664 665 666 667 668 669 670 671
<dd><p>Prepare memory space <dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>obj is a timestep of one sample. </dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner13finishPrepareER8Argument">
672
<span id="paddle::SparseNonValueScanner::finishPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1a6bb2ee71907ea1bd6aa1317a0a516325"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
673 674 675 676 677
<dd><p>Finish Prepare step. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner9startFillER8Argument">
678
<span id="paddle::SparseNonValueScanner::startFill__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1aaec784422b1358600198ab0a2b387e94"></span><em class="property">virtual</em> void <code class="descname">startFill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner9startFillER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
679 680 681 682 683
<dd><p>Start fill step. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner4fillER8ArgumentP8PyObject">
684
<span id="paddle::SparseNonValueScanner::fill__ArgumentR.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1acef6e5425aa9c4b1865cca005df2a25e"></span><em class="property">virtual</em> void <code class="descname">fill</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner4fillER8ArgumentP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
685 686 687 688 689 690 691 692
<dd><p>Fill one sparse vector to argument. <dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>obj is a timestep of one sample. </dd>
</dl>
</p>
</dd></dl>

</div>
693
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
694 695 696
<p class="breathe-sectiondef-title rubric">Protected Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle21SparseNonValueScanner7setDataEPiP4realP8PyObject">
697
<span id="paddle::SparseNonValueScanner::setData__iP.realP.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1a849d280e40e9f3ba9947e799c389fafd"></span><em class="property">virtual</em> void <code class="descname">setData</code><span class="sig-paren">(</span>int *<em>col</em>, real *<em>dat</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner7setDataEPiP4realP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
698 699
<dd><p>Set a single sparse index and value. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
700 701 702 703
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">col</span></code>: sparse index </li>
<li><code class="docutils literal"><span class="pre">dat</span></code>: sparse value </li>
<li><code class="docutils literal"><span class="pre">obj</span></code>: Python Object. For sparse_non_value is a PyInt or PyLong. For sparse_value is a Tuple (int, float). </li>
Y
Yu Yang 已提交
704 705 706 707 708 709 710
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
711
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
712 713 714 715 716 717 718 719 720 721 722 723 724 725
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
<dl class="member">
<dt id="_CPPv2N6paddle21SparseNonValueScanner4nnz_E">
<span id="paddle::SparseNonValueScanner::nnz___s"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1a3133f8513f67786d4967ab3dac3bfa69"></span>size_t <code class="descname">nnz_</code><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner4nnz_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle21SparseNonValueScanner7height_E">
<span id="paddle::SparseNonValueScanner::height___s"></span><span class="target" id="paddleclasspaddle_1_1SparseNonValueScanner_1adbacd44fd0ce6877370b89a587ff6b12"></span>size_t <code class="descname">height_</code><a class="headerlink" href="#_CPPv2N6paddle21SparseNonValueScanner7height_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

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

Y
Yu Yang 已提交
726 727 728
</div>
<div class="section" id="sparsevaluescanner">
<h2>SparseValueScanner<a class="headerlink" href="#sparsevaluescanner" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
729 730
<dl class="class">
<dt id="_CPPv2N6paddle18SparseValueScannerE">
Y
Yu Yang 已提交
731
<span id="paddle::SparseValueScanner"></span><span class="target" id="paddleclasspaddle_1_1SparseValueScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">SparseValueScanner</code><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScannerE" title="Permalink to this definition"></a></dt>
732
<dd><p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1SparseNonValueScanner"><span class="std std-ref">paddle::SparseNonValueScanner</span></a></p>
733
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
734 735 736
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle18SparseValueScanner18SparseValueScannerEP10SlotHeader">
Y
Yu Yang 已提交
737
<span id="paddle::SparseValueScanner::SparseValueScanner__SlotHeaderP"></span><span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1ac60678603f86a3ee2b1df3bf6b3de343"></span><code class="descname">SparseValueScanner</code><span class="sig-paren">(</span>SlotHeader *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner18SparseValueScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
738 739 740 741
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle18SparseValueScanner13finishPrepareER8Argument">
742
<span id="paddle::SparseValueScanner::finishPrepare__ArgumentR"></span><span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1aa24ba4b1484c3db126155e3f6f83134f"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
743 744 745 746
<dd><p>Finish Prepare step. </p>
</dd></dl>

</div>
747
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
748 749 750
<p class="breathe-sectiondef-title rubric">Protected Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle18SparseValueScanner7setDataEPiP4realP8PyObject">
751
<span id="paddle::SparseValueScanner::setData__iP.realP.PyObjectP"></span><span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1a7ce575283c13b11a44f7236507e68b01"></span><em class="property">virtual</em> void <code class="descname">setData</code><span class="sig-paren">(</span>int *<em>col</em>, real *<em>dat</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner7setDataEPiP4realP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
752 753
<dd><p>Set a single sparse index and value. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
754 755 756 757
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">col</span></code>: sparse index </li>
<li><code class="docutils literal"><span class="pre">dat</span></code>: sparse value </li>
<li><code class="docutils literal"><span class="pre">obj</span></code>: Python Object. For sparse_non_value is a PyInt or PyLong. For sparse_value is a Tuple (int, float). </li>
Y
Yu Yang 已提交
758 759 760 761 762 763 764 765 766
</ul>
</dd>
</dl>
</p>
</dd></dl>

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

Y
Yu Yang 已提交
767 768 769 770 771
</div>
<div class="section" id="sequencescanner">
<h2>SequenceScanner<a class="headerlink" href="#sequencescanner" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle18SparseValueScannerE">
772 773
<span class="target" id="paddleclasspaddle_1_1SparseValueScanner"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">SparseValueScanner</code><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScannerE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1SparseNonValueScanner"><span class="std std-ref">paddle::SparseNonValueScanner</span></a></p>
774
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
775 776
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
Y
Yu Yang 已提交
777
<dt id="_CPPv2N6paddle18SparseValueScanner18SparseValueScannerEP10SlotHeader">
778
<span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1ac60678603f86a3ee2b1df3bf6b3de343"></span><code class="descname">SparseValueScanner</code><span class="sig-paren">(</span>SlotHeader *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner18SparseValueScannerEP10SlotHeader" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
779 780 781
<dd></dd></dl>

<dl class="function">
Y
Yu Yang 已提交
782
<dt id="_CPPv2N6paddle18SparseValueScanner13finishPrepareER8Argument">
783
<span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1aa24ba4b1484c3db126155e3f6f83134f"></span><em class="property">virtual</em> void <code class="descname">finishPrepare</code><span class="sig-paren">(</span><a class="reference internal" href="../../parameter/parameter/parameter.html#_CPPv2N6paddle8ArgumentE" title="paddle::Argument">Argument</a> &amp;<em>argument</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner13finishPrepareER8Argument" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
784 785
<dd><p>Finish Prepare step. </p>
</dd></dl>
Y
Yu Yang 已提交
786

Y
Yu Yang 已提交
787
</div>
788
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
789
<p class="breathe-sectiondef-title rubric">Protected Functions</p>
Y
Yu Yang 已提交
790
<dl class="function">
Y
Yu Yang 已提交
791
<dt id="_CPPv2N6paddle18SparseValueScanner7setDataEPiP4realP8PyObject">
792
<span class="target" id="paddleclasspaddle_1_1SparseValueScanner_1a7ce575283c13b11a44f7236507e68b01"></span><em class="property">virtual</em> void <code class="descname">setData</code><span class="sig-paren">(</span>int *<em>col</em>, real *<em>dat</em>, PyObject *<em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle18SparseValueScanner7setDataEPiP4realP8PyObject" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
793 794
<dd><p>Set a single sparse index and value. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
795 796 797 798
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">col</span></code>: sparse index </li>
<li><code class="docutils literal"><span class="pre">dat</span></code>: sparse value </li>
<li><code class="docutils literal"><span class="pre">obj</span></code>: Python Object. For sparse_non_value is a PyInt or PyLong. For sparse_value is a Tuple (int, float). </li>
Y
Yu Yang 已提交
799 800 801 802
</ul>
</dd>
</dl>
</p>
Y
Yu Yang 已提交
803 804
</dd></dl>

Y
Yu Yang 已提交
805 806 807 808 809 810 811 812 813 814
</div>
</dd></dl>

</div>
<div class="section" id="ipydataprovidercache">
<h2>IPyDataProviderCache<a class="headerlink" href="#ipydataprovidercache" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle20IPyDataProviderCacheE">
<span id="paddle::IPyDataProviderCache"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">IPyDataProviderCache</code><a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCacheE" title="Permalink to this definition"></a></dt>
<dd><p>Py Data Provider Cache Interface. </p>
815
<p>Subclassed by <a class="reference internal" href="#paddleclasspaddle_1_1CacheOnePassInMemory"><span class="std std-ref">paddle::CacheOnePassInMemory</span></a>, <a class="reference internal" href="#paddleclasspaddle_1_1NoCacheStrategy"><span class="std std-ref">paddle::NoCacheStrategy</span></a></p>
816
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
817
<p class="breathe-sectiondef-title rubric">Public Functions</p>
Y
Yu Yang 已提交
818
<dl class="function">
Y
Yu Yang 已提交
819
<dt id="_CPPv2N6paddle20IPyDataProviderCacheD0Ev">
820
<span id="paddle::IPyDataProviderCache::~IPyDataProviderCache"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache_1a986e919051b2c173be86b9240c417311"></span><em class="property">virtual</em> <code class="descname">~IPyDataProviderCache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCacheD0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
821 822 823 824
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle20IPyDataProviderCache5resetEv">
825
<span id="paddle::IPyDataProviderCache::reset"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache_1acb82068255c8feecd946722b1e087fd1"></span><em class="property">virtual</em> bool <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCache5resetEv" title="Permalink to this definition"></a></dt>
826
<dd><p>invoke when <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">DataProvider::reset()</span></a> <dl class="docutils">
Y
Yu Yang 已提交
827 828 829 830
<dt><strong>Return</strong></dt>
<dd>true if read data from python. </dd>
</dl>
</p>
Y
Yu Yang 已提交
831 832 833
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
834
<dt id="_CPPv2N6paddle20IPyDataProviderCache4dropEPNSt5dequeI11PyObjectPtrEE">
835
<span id="paddle::IPyDataProviderCache::drop__std::deque:PyObjectPtr:P"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache_1a7dbdb55a79bd8aa1bff28a4b1e36d81c"></span><em class="property">virtual</em> void <code class="descname">drop</code><span class="sig-paren">(</span>std::deque&lt;PyObjectPtr&gt; *<em>data</em><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCache4dropEPNSt5dequeI11PyObjectPtrEE" title="Permalink to this definition"></a></dt>
836
<dd><p>invoke when these data are used by <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">DataProvider</span></a>, and need to clear. <dl class="docutils">
Y
Yu Yang 已提交
837 838 839
<dt><strong>Note</strong></dt>
<dd>The implemented class must clear these data array. Or if you want to delete the PyObjectPtr later, you should make sure the paddle process only have one active thread calling python code (use PyGuard otherwise). </dd>
<dt><strong>Parameters</strong></dt>
840 841
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: used data.</li>
Y
Yu Yang 已提交
842 843 844 845
</ul>
</dd>
</dl>
</p>
Y
Yu Yang 已提交
846 847 848
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
849
<dt id="_CPPv2N6paddle20IPyDataProviderCache4loadEv">
850
<span id="paddle::IPyDataProviderCache::load"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache_1a59ccf101c184477ff77ea0f618eeffc8"></span><em class="property">virtual</em> std::deque&lt;PyObjectPtr&gt; *<code class="descname">load</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = 0<a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCache4loadEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
851 852
<dd><p>Return whole data in cache. </p>
</dd></dl>
Y
Yu Yang 已提交
853 854

</div>
855
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
856 857 858 859 860 861
<p class="breathe-sectiondef-title rubric">Public Static Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle20IPyDataProviderCache6createE9CacheType">
<span id="paddle::IPyDataProviderCache::create__CacheType"></span><span class="target" id="paddleclasspaddle_1_1IPyDataProviderCache_1af390cc1038d92e555d4173f31397cc91"></span><a class="reference internal" href="#_CPPv2N6paddle20IPyDataProviderCacheE" title="paddle::IPyDataProviderCache">IPyDataProviderCache</a> *<code class="descname">create</code><span class="sig-paren">(</span>CacheType <em>ct</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20IPyDataProviderCache6createE9CacheType" title="Permalink to this definition"></a></dt>
<dd><p>Factory method. Convert CacheType to IPyDataProviderCache* </p>
</dd></dl>
Y
Yu Yang 已提交
862

Y
Yu Yang 已提交
863 864
</div>
</dd></dl>
Y
Yu Yang 已提交
865 866

</div>
Y
Yu Yang 已提交
867 868 869 870 871 872
<div class="section" id="nocachestrategy">
<h2>NoCacheStrategy<a class="headerlink" href="#nocachestrategy" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle15NoCacheStrategyE">
<span id="paddle::NoCacheStrategy"></span><span class="target" id="paddleclasspaddle_1_1NoCacheStrategy"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">NoCacheStrategy</code><a class="headerlink" href="#_CPPv2N6paddle15NoCacheStrategyE" title="Permalink to this definition"></a></dt>
<dd><p>No Cache Strategy. Will destruct old data immediately and load data from python every pass. </p>
873
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1IPyDataProviderCache"><span class="std std-ref">paddle::IPyDataProviderCache</span></a></p>
874
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
875 876 877
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle15NoCacheStrategy5resetEv">
878
<span id="paddle::NoCacheStrategy::reset"></span><span class="target" id="paddleclasspaddle_1_1NoCacheStrategy_1a6df4eaccffeb0e7e69f68afb98300fc0"></span><em class="property">virtual</em> bool <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15NoCacheStrategy5resetEv" title="Permalink to this definition"></a></dt>
879
<dd><p>invoke when <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">DataProvider::reset()</span></a> <dl class="docutils">
Y
Yu Yang 已提交
880 881 882 883 884
<dt><strong>Return</strong></dt>
<dd>true if read data from python. </dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
885

Y
Yu Yang 已提交
886 887
<dl class="function">
<dt id="_CPPv2N6paddle15NoCacheStrategy4dropEPNSt5dequeI11PyObjectPtrEE">
888
<span id="paddle::NoCacheStrategy::drop__std::deque:PyObjectPtr:P"></span><span class="target" id="paddleclasspaddle_1_1NoCacheStrategy_1a9333fe134249c2ac567df6044d6367de"></span><em class="property">virtual</em> void <code class="descname">drop</code><span class="sig-paren">(</span>std::deque&lt;PyObjectPtr&gt; *<em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15NoCacheStrategy4dropEPNSt5dequeI11PyObjectPtrEE" title="Permalink to this definition"></a></dt>
889
<dd><p>invoke when these data are used by <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">DataProvider</span></a>, and need to clear. <dl class="docutils">
Y
Yu Yang 已提交
890 891 892
<dt><strong>Note</strong></dt>
<dd>The implemented class must clear these data array. Or if you want to delete the PyObjectPtr later, you should make sure the paddle process only have one active thread calling python code (use PyGuard otherwise). </dd>
<dt><strong>Parameters</strong></dt>
893 894
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: used data.</li>
Y
Yu Yang 已提交
895 896 897 898 899
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
900

Y
Yu Yang 已提交
901 902
<dl class="function">
<dt id="_CPPv2N6paddle15NoCacheStrategy4loadEv">
903
<span id="paddle::NoCacheStrategy::load"></span><span class="target" id="paddleclasspaddle_1_1NoCacheStrategy_1afb54b93574a3f43104d8e55d2d8c259b"></span><em class="property">virtual</em> std::deque&lt;PyObjectPtr&gt; *<code class="descname">load</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15NoCacheStrategy4loadEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
904 905
<dd><p>Return whole data in cache. </p>
</dd></dl>
Y
Yu Yang 已提交
906

Y
Yu Yang 已提交
907 908
</div>
</dd></dl>
Y
Yu Yang 已提交
909 910

</div>
Y
Yu Yang 已提交
911 912 913 914 915 916 917
<div class="section" id="cacheonepassinmemory">
<h2>CacheOnePassInMemory<a class="headerlink" href="#cacheonepassinmemory" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle20CacheOnePassInMemoryE">
<span id="paddle::CacheOnePassInMemory"></span><span class="target" id="paddleclasspaddle_1_1CacheOnePassInMemory"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">CacheOnePassInMemory</code><a class="headerlink" href="#_CPPv2N6paddle20CacheOnePassInMemoryE" title="Permalink to this definition"></a></dt>
<dd><p>Cache One Pass In Memory strategy.</p>
<p>In first pass, will load data from python and store them in memory. The rest passes, will load data from memory. </p>
918
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1IPyDataProviderCache"><span class="std std-ref">paddle::IPyDataProviderCache</span></a></p>
919
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
920
<p class="breathe-sectiondef-title rubric">Public Functions</p>
Y
Yu Yang 已提交
921
<dl class="function">
Y
Yu Yang 已提交
922 923
<dt id="_CPPv2N6paddle20CacheOnePassInMemory20CacheOnePassInMemoryEv">
<span id="paddle::CacheOnePassInMemory::CacheOnePassInMemory"></span><span class="target" id="paddleclasspaddle_1_1CacheOnePassInMemory_1a9ffe6049eac836b6c281b67fea71e524"></span><code class="descname">CacheOnePassInMemory</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20CacheOnePassInMemory20CacheOnePassInMemoryEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
924 925 926
<dd></dd></dl>

<dl class="function">
Y
Yu Yang 已提交
927
<dt id="_CPPv2N6paddle20CacheOnePassInMemory5resetEv">
928
<span id="paddle::CacheOnePassInMemory::reset"></span><span class="target" id="paddleclasspaddle_1_1CacheOnePassInMemory_1ac2faf131badc1a5e238f5c591abee499"></span><em class="property">virtual</em> bool <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20CacheOnePassInMemory5resetEv" title="Permalink to this definition"></a></dt>
929
<dd><p>invoke when <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a0c1ec00a365e8cd12ad170ac00879890"><span class="std std-ref">DataProvider::reset()</span></a> <dl class="docutils">
Y
Yu Yang 已提交
930 931 932 933 934
<dt><strong>Return</strong></dt>
<dd>true if read data from python. </dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
935 936

<dl class="function">
Y
Yu Yang 已提交
937
<dt id="_CPPv2N6paddle20CacheOnePassInMemory4dropEPNSt5dequeI11PyObjectPtrEE">
938
<span id="paddle::CacheOnePassInMemory::drop__std::deque:PyObjectPtr:P"></span><span class="target" id="paddleclasspaddle_1_1CacheOnePassInMemory_1ae535ea1707a787e4888cb4c908f82705"></span><em class="property">virtual</em> void <code class="descname">drop</code><span class="sig-paren">(</span>std::deque&lt;PyObjectPtr&gt; *<em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20CacheOnePassInMemory4dropEPNSt5dequeI11PyObjectPtrEE" title="Permalink to this definition"></a></dt>
939
<dd><p>invoke when these data are used by <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">DataProvider</span></a>, and need to clear. <dl class="docutils">
Y
Yu Yang 已提交
940 941 942
<dt><strong>Note</strong></dt>
<dd>The implemented class must clear these data array. Or if you want to delete the PyObjectPtr later, you should make sure the paddle process only have one active thread calling python code (use PyGuard otherwise). </dd>
<dt><strong>Parameters</strong></dt>
943 944
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: used data.</li>
Y
Yu Yang 已提交
945 946 947 948 949
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
950 951

<dl class="function">
Y
Yu Yang 已提交
952
<dt id="_CPPv2N6paddle20CacheOnePassInMemory4loadEv">
953
<span id="paddle::CacheOnePassInMemory::load"></span><span class="target" id="paddleclasspaddle_1_1CacheOnePassInMemory_1a95549d6eef3022fe85cac854d3caff74"></span><em class="property">virtual</em> std::deque&lt;PyObjectPtr&gt; *<code class="descname">load</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle20CacheOnePassInMemory4loadEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
954
<dd><p>Return whole data in cache. </p>
Y
Yu Yang 已提交
955 956
</dd></dl>

Y
Yu Yang 已提交
957
</div>
Y
Yu Yang 已提交
958 959
</dd></dl>

Y
Yu Yang 已提交
960 961 962 963 964 965
</div>
<div class="section" id="ipydataprovider">
<h2>IPyDataProvider<a class="headerlink" href="#ipydataprovider" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="_CPPv2N6paddle15PyDataProvider2E">
<span id="paddle::PyDataProvider2"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">PyDataProvider2</code><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider2E" title="Permalink to this definition"></a></dt>
966
<dd><p><a class="reference internal" href="#paddleclasspaddle_1_1PyDataProvider2"><span class="std std-ref">PyDataProvider2</span></a>.</p>
Y
Yu Yang 已提交
967 968
<p>For usage, please refer python module &#8216;paddle.trainer.PyDataProvider2&#8217;</p>
<p>Here, we start a thread to read data. It is totally asynchronous for reading data. And it support cache strategies. </p>
969
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">paddle::DataProvider</span></a></p>
970
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
971 972
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
973 974
<dt id="_CPPv2N6paddle15PyDataProvider215PyDataProvider2ERK10DataConfigRK11ModelConfigb">
<span id="paddle::PyDataProvider2::PyDataProvider2__DataConfigCR.ModelConfigCR.b"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1a2281a7aca7c68247414746864688e7bb"></span><code class="descname">PyDataProvider2</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, <em class="property">const</em> <a class="reference internal" href="../../api/api.html#_CPPv211ModelConfig" title="ModelConfig">ModelConfig</a> &amp;<em>modelConfig</em>, bool <em>useGpu</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider215PyDataProvider2ERK10DataConfigRK11ModelConfigb" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
975 976
<dd><p>Ctor </p>
</dd></dl>
Y
Yu Yang 已提交
977 978

<dl class="function">
Y
Yu Yang 已提交
979
<dt id="_CPPv2N6paddle15PyDataProvider2D0Ev">
980
<span id="paddle::PyDataProvider2::~PyDataProvider2"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1a3f265566b0f6bb653a2d37ddbb8beb11"></span><em class="property">virtual</em> <code class="descname">~PyDataProvider2</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider2D0Ev" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
981 982 983 984 985
<dd><p>Dtor <dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>will stop loading thread when destructing </dd>
</dl>
</p>
Y
Yu Yang 已提交
986 987 988
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
989
<dt id="_CPPv2N6paddle15PyDataProvider25resetEv">
990
<span id="paddle::PyDataProvider2::reset"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1a905324717b124964912952f267dba44b"></span><em class="property">virtual</em> void <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider25resetEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
991
<dd><p>Resetting the PyDataProvider. May start reading thread here. </p>
Y
Yu Yang 已提交
992 993 994
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
995
<dt id="_CPPv2N6paddle15PyDataProvider27shuffleEv">
996
<span id="paddle::PyDataProvider2::shuffle"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1a94938d24c413541633a31f2f95ce9503"></span>void <code class="descname">shuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider27shuffleEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
997
<dd><p>Shuffle. Do nothing because PyDataProvider do shuffle implicitly by random select data from datapool. </p>
Y
Yu Yang 已提交
998 999 1000
</dd></dl>

<dl class="function">
Y
Yu Yang 已提交
1001
<dt id="_CPPv2N6paddle15PyDataProvider27getSizeEv">
1002
<span id="paddle::PyDataProvider2::getSize"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1af10be764838042265b1b57d6d23683ec"></span>int64_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider27getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1003 1004
<dd><p>Not limited size. </p>
</dd></dl>
Y
Yu Yang 已提交
1005 1006

<dl class="function">
Y
Yu Yang 已提交
1007
<dt id="_CPPv2N6paddle15PyDataProvider220getNextBatchInternalE7int64_tP9DataBatch">
1008
<span id="paddle::PyDataProvider2::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1PyDataProvider2_1a208602779d17708e5134f1120f3f0b6e"></span>int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size_</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle15PyDataProvider220getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1009
<dd><p>Loading a batch of data. </p>
Y
Yu Yang 已提交
1010 1011
</dd></dl>

Y
Yu Yang 已提交
1012
</div>
Y
Yu Yang 已提交
1013 1014
</dd></dl>

Y
Yu Yang 已提交
1015
</div>
Y
Yu Yang 已提交
1016 1017
</div>
<div class="section" id="proto-data-provider">
Y
Yu Yang 已提交
1018 1019 1020 1021
<h1>Proto Data Provider<a class="headerlink" href="#proto-data-provider" title="Permalink to this headline"></a></h1>
<div class="section" id="protodataprovider">
<h2>ProtoDataProvider<a class="headerlink" href="#protodataprovider" title="Permalink to this headline"></a></h2>
<dl class="class">
Y
Yu Yang 已提交
1022
<dt id="_CPPv2N6paddle17ProtoDataProviderE">
Y
Yu Yang 已提交
1023 1024 1025
<span id="paddle::ProtoDataProvider"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">ProtoDataProvider</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProviderE" title="Permalink to this definition"></a></dt>
<dd><p>Provider data from protobuf data file with each sample specified by proto message. </p>
<p>DataSample defined in DataFormat.proto.</p>
Y
Yu Yang 已提交
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036
<p>The file format is</p>
<p>header</p>
<p>sample1</p>
<p>sample2</p>
<p>...</p>
<p>sampleN</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>: In the data file, each message is prefixed with its length. The read/write of the protbuf are implemented in ProtoReader.h </dd>
</dl>
</p>
1037 1038
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider"><span class="std std-ref">paddle::DataProvider</span></a></p>
<p>Subclassed by <a class="reference internal" href="#paddleclasspaddle_1_1ProtoSequenceDataProvider"><span class="std std-ref">paddle::ProtoSequenceDataProvider</span></a></p>
1039
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1040 1041 1042 1043 1044 1045 1046 1047
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider17ProtoDataProviderERK10DataConfigbb">
<span id="paddle::ProtoDataProvider::ProtoDataProvider__DataConfigCR.b.b"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a1444b87df672b4dd937d5647fee23936"></span><code class="descname">ProtoDataProvider</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, bool <em>useGpu</em>, bool <em>loadDataAll</em> = true<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider17ProtoDataProviderERK10DataConfigbb" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider5resetEv">
1048
<span id="paddle::ProtoDataProvider::reset"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a4c31d54b6f4ec7e6e11a8824650ec34f"></span>void <code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider5resetEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1049 1050 1051
<dd><p>reset all the value of index </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
1052
<dd><a class="reference internal" href="#paddleclasspaddle_1_1ProtoDataProvider_1a4c31d54b6f4ec7e6e11a8824650ec34f"><span class="std std-ref">reset()</span></a> must be called before any calls to <a class="reference internal" href="#paddleclasspaddle_1_1DataProvider_1a98d9d269b628ac7c8354a8a7de049a7b"><span class="std std-ref">getNextBatch()</span></a> IMPORTANT: subclass <a class="reference internal" href="#paddleclasspaddle_1_1ProtoDataProvider_1a4c31d54b6f4ec7e6e11a8824650ec34f"><span class="std std-ref">reset()</span></a> should always call the base class <a class="reference internal" href="#paddleclasspaddle_1_1ProtoDataProvider_1a4c31d54b6f4ec7e6e11a8824650ec34f"><span class="std std-ref">reset()</span></a> at the end of the function </dd>
Y
Yu Yang 已提交
1053 1054
</dl>
</p>
Y
Yu Yang 已提交
1055 1056 1057 1058
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider7getSizeEv">
1059
<span id="paddle::ProtoDataProvider::getSize"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a2937d941318f1692cd9aed6cafcaf13e"></span><em class="property">virtual</em> int64_t <code class="descname">getSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider7getSizeEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1060 1061 1062 1063 1064 1065 1066 1067 1068
<dd><p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>this size includes the sequences which are skipped because they are longer than the batch size. </dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider7shuffleEv">
1069
<span id="paddle::ProtoDataProvider::shuffle"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a5651ad4073486a86f798c54432c852b5"></span>void <code class="descname">shuffle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider7shuffleEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1070
<dd><p>Shuffle the data set. </p>
Y
Yu Yang 已提交
1071 1072 1073 1074 1075 1076 1077 1078 1079
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider8loadDataERKNSt6vectorINSt6stringEEE">
<span id="paddle::ProtoDataProvider::loadData__std::vector:ss:CR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a3ef03215a33b54f58ffa0880ee13c869"></span>void <code class="descname">loadData</code><span class="sig-paren">(</span><em class="property">const</em> std::vector&lt;std::string&gt; &amp;<em>fileList</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider8loadDataERKNSt6vectorINSt6stringEEE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider20getNextBatchInternalE7int64_tP9DataBatch">
1080
<span id="paddle::ProtoDataProvider::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a5562b11758a3c2479101b314097c2e67"></span>int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider20getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1081 1082 1083 1084 1085
<dd><p>Get next batch training samples internally. </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
1086 1087 1088
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
1089 1090 1091 1092 1093
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
1094 1095

</div>
1096
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1097 1098 1099 1100
<p class="breathe-sectiondef-title rubric">Protected Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider8loadDataERKNSt6stringE">
<span id="paddle::ProtoDataProvider::loadData__ssCR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a8c34e7e24a00bccc3cc5e74354ae2607"></span>void <code class="descname">loadData</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>fileName</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider8loadDataERKNSt6stringE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1101 1102 1103
<dd><p>load protobuf data from a list of file </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1104 1105
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">fileName</span></code>: file name of a file which contains a list of file names </li>
Y
Yu Yang 已提交
1106 1107 1108 1109 1110
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
1111 1112 1113 1114

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider12loadDataFileERKNSt6stringE">
<span id="paddle::ProtoDataProvider::loadDataFile__ssCR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1afa1f97a7980c9a5d971b78a307ea6f9e"></span>void <code class="descname">loadDataFile</code><span class="sig-paren">(</span><em class="property">const</em> std::string &amp;<em>fileName</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12loadDataFileERKNSt6stringE" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1115 1116 1117
<dd><p>load protobuf data from file </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1118 1119
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">fileName</span></code>: data file name </li>
Y
Yu Yang 已提交
1120 1121 1122 1123 1124
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
1125 1126 1127 1128

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider15checkDataHeaderERK10DataHeader">
<span id="paddle::ProtoDataProvider::checkDataHeader__DataHeaderCR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a1bc314edfeb05e1ff7ef6c9f8d152acf"></span>void <code class="descname">checkDataHeader</code><span class="sig-paren">(</span><em class="property">const</em> DataHeader &amp;<em>header</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider15checkDataHeaderERK10DataHeader" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1129 1130 1131
<dd><p>check data header of each data sample </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1132 1133
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">header</span></code>: data header read from protobuf data </li>
Y
Yu Yang 已提交
1134 1135 1136 1137 1138
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
1139 1140 1141 1142

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider9fillSlotsERK10DataSample">
<span id="paddle::ProtoDataProvider::fillSlots__DataSampleCR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a045666b799ab0679fd8abc9d57ee3235"></span>void <code class="descname">fillSlots</code><span class="sig-paren">(</span><em class="property">const</em> DataSample &amp;<em>sample</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9fillSlotsERK10DataSample" title="Permalink to this definition"></a></dt>
1143
<dd><p>fill protobuf data into slot_, slot_ is a vector of <a class="reference internal" href="#paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot"><span class="std std-ref">ProtoSlot</span></a> in memory. </p>
Y
Yu Yang 已提交
1144 1145
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1146 1147
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">sample</span></code>: data sample read from protobuf data </li>
Y
Yu Yang 已提交
1148 1149 1150 1151 1152
</ul>
</dd>
</dl>
</p>
</dd></dl>
Y
Yu Yang 已提交
1153 1154

<dl class="function">
1155 1156
<dt id="_CPPv2NK6paddle17ProtoDataProvider7iidDataEv">
<span id="paddle::ProtoDataProvider::iidDataC"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a331829ff4263fea18ac791113085e814"></span>bool <code class="descname">iidData</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv2NK6paddle17ProtoDataProvider7iidDataEv" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1157 1158 1159 1160 1161 1162
<dd><p>return true if each sample is one sequence, i.e., independent of other samples. </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider11checkSampleERK10DataSample">
<span id="paddle::ProtoDataProvider::checkSample__DataSampleCR"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1ad7049069d10986c616e1d191e5ec0d81"></span>void <code class="descname">checkSample</code><span class="sig-paren">(</span><em class="property">const</em> DataSample &amp;<em>sample</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider11checkSampleERK10DataSample" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1163 1164
<dd><p>check that sample is consistent with header_ </p>
</dd></dl>
Y
Yu Yang 已提交
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv2N6paddle17ProtoDataProvider12sequenceLoopE2Op7int64_t">
<span id="paddle::ProtoDataProvider::sequenceLoop__Op.int64_t"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1abc5d838bf06d417a89671affbd5687ef"></span>int64_t <code class="descname">sequenceLoop</code><span class="sig-paren">(</span>Op <em>op</em>, int64_t <em>size</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12sequenceLoopE2Op7int64_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv2N6paddle17ProtoDataProvider10sampleLoopE2Op7int64_t">
<span id="paddle::ProtoDataProvider::sampleLoop__Op.int64_t"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a2120b825191a2027ff721c83782b106c"></span>int64_t <code class="descname">sampleLoop</code><span class="sig-paren">(</span>Op <em>op</em>, int64_t <em>size</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider10sampleLoopE2Op7int64_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv2N6paddle17ProtoDataProvider13subSampleLoopE2Op7int64_ti">
<span id="paddle::ProtoDataProvider::subSampleLoop__Op.int64_t.i"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a2b7076c45d5a91e3a15335d49174450c"></span>int64_t <code class="descname">subSampleLoop</code><span class="sig-paren">(</span>Op <em>op</em>, int64_t <em>size</em>, int <em>slot</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider13subSampleLoopE2Op7int64_ti" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle17ProtoDataProvider13showDataStatsEv">
<span id="paddle::ProtoDataProvider::showDataStats"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a6080604d45a6c7302b7fea76c4a3bc1c"></span>void <code class="descname">showDataStats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider13showDataStatsEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1193
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232
<p class="breathe-sectiondef-title rubric">Protected Attributes</p>
<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider7header_E">
<span id="paddle::ProtoDataProvider::header___DataHeader"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a7cb5edec235db30d5c5c033ca9ee443f"></span>DataHeader <code class="descname">header_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider7header_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider12numVecSlots_E">
<span id="paddle::ProtoDataProvider::numVecSlots___i"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a87a24205bc188931f029b6ea22750dda"></span>int <code class="descname">numVecSlots_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12numVecSlots_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider6slots_E">
<span id="paddle::ProtoDataProvider::slots___std::vector:ProtoSlot:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a0a31d2c6ea254cef43ef9161f8e65e52"></span>std::vector&lt;<a class="reference internal" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlotE" title="paddle::ProtoDataProvider::ProtoSlot">ProtoSlot</a>&gt; <code class="descname">slots_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider6slots_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider11sampleNums_E">
<span id="paddle::ProtoDataProvider::sampleNums___s"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1afb5e9c365f039b3cdd90fd453a289ab7"></span>size_t <code class="descname">sampleNums_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider11sampleNums_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider23sequenceStartPositions_E">
<span id="paddle::ProtoDataProvider::sequenceStartPositions___std::vector:s:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1af872deeb9526acc95cdb1eeb1ebd08e3"></span>std::vector&lt;size_t&gt; <code class="descname">sequenceStartPositions_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider23sequenceStartPositions_E" title="Permalink to this definition"></a></dt>
<dd><p>The starting position of each sequence in samples. The last element should be num of samples. If empty, each sample is one sequence. </p>
</dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider21currentSequenceIndex_E">
<span id="paddle::ProtoDataProvider::currentSequenceIndex___int64_t"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a5f8b70c01ccccc8406cb26cd8adaa7eb"></span>int64_t <code class="descname">currentSequenceIndex_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider21currentSequenceIndex_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider20shuffledSequenceIds_E">
<span id="paddle::ProtoDataProvider::shuffledSequenceIds___std::vector:s:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a50ef3267cae329ec134691da482f49b5"></span>std::vector&lt;size_t&gt; <code class="descname">shuffledSequenceIds_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider20shuffledSequenceIds_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9cpuBatch_E">
Y
Yu Yang 已提交
1233
<span id="paddle::ProtoDataProvider::cpuBatch___ThreadLocalD:DataBatch:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1aa67b8e5444e4853e0e864910fad9964b"></span>ThreadLocalD&lt;DataBatch&gt; <code class="descname">cpuBatch_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9cpuBatch_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1234 1235 1236 1237
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9gpuBatch_E">
Y
Yu Yang 已提交
1238
<span id="paddle::ProtoDataProvider::gpuBatch___ThreadLocalD:DataBatch:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a8e61322f799747d216955245278dc3bf"></span>ThreadLocalD&lt;DataBatch&gt; <code class="descname">gpuBatch_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9gpuBatch_E" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider5lock_E">
<span id="paddle::ProtoDataProvider::lock___RWLock"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1ad956c5a11a361d09aabcfa28f0e678a7"></span><a class="reference internal" href="../../utils/thread.html#_CPPv2N6paddle6RWLockE" title="paddle::RWLock">RWLock</a> <code class="descname">lock_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider5lock_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9nnzStats_E">
<span id="paddle::ProtoDataProvider::nnzStats___std::vector:StatPtr:"></span><span class="target" id="paddleclasspaddle_1_1ProtoDataProvider_1a25e72fe5b6dd687e9672d395d2bf7efd"></span>std::vector&lt;StatPtr&gt; <code class="descname">nnzStats_</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9nnzStats_E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
<dl class="class">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlotE">
<span id="paddle::ProtoDataProvider::ProtoSlot"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot"></span><em class="property">struct </em><code class="descname">ProtoSlot</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlotE" title="Permalink to this definition"></a></dt>
1255
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot4typeE">
<span id="paddle::ProtoDataProvider::ProtoSlot::type__SlotDef::SlotType"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a756d632bac54b2915069cc0712753895"></span>SlotDef::SlotType <code class="descname">type</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot4typeE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot3dimE">
<span id="paddle::ProtoDataProvider::ProtoSlot::dim__i"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a7287f7d382b6cacbfa75e79270c476e4"></span>int <code class="descname">dim</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot3dimE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot9indexDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::indexData__std::vector:i:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a244da06737c7902a85d0d8392b65183b"></span>std::vector&lt;int&gt; <code class="descname">indexData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot9indexDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot9denseDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::denseData__std::vector:real:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a71ed272648ae1a3fc1df49d4daa2e0f0"></span>std::vector&lt;real&gt; <code class="descname">denseData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot9denseDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot18sparseNonValueDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::sparseNonValueData__std::vector:sparse_non_value_t:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1afb39915e14f356233d087fd3a55f0b1a"></span>std::vector&lt;<a class="reference internal" href="../../math/matrix/matrix.html#_CPPv2N6paddle18sparse_non_value_tE" title="paddle::sparse_non_value_t">sparse_non_value_t</a>&gt; <code class="descname">sparseNonValueData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot18sparseNonValueDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot20sparseFloatValueDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::sparseFloatValueData__std::vector:sparse_float_value_t:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a9b30d9bc79f5bb85d22cfff006ac0a8b"></span>std::vector&lt;<a class="reference internal" href="../../math/matrix/matrix.html#_CPPv2N6paddle20sparse_float_value_tE" title="paddle::sparse_float_value_t">sparse_float_value_t</a>&gt; <code class="descname">sparseFloatValueData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot20sparseFloatValueDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot7indicesE">
<span id="paddle::ProtoDataProvider::ProtoSlot::indices__std::vector:int64_t:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a2899a55ceded91a71bcc000ec23a549a"></span>std::vector&lt;int64_t&gt; <code class="descname">indices</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot7indicesE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot10subIndicesE">
<span id="paddle::ProtoDataProvider::ProtoSlot::subIndices__std::vector:int64_t:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a7b6f0f140df5b083329343bfd7043a59"></span>std::vector&lt;int64_t&gt; <code class="descname">subIndices</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot10subIndicesE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot12varDenseDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::varDenseData__std::vector:ProtoVarSlot:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1ae9990f845f1587c3aa5f379cdee6246b"></span>std::vector&lt;<a class="reference internal" href="#_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlotE" title="paddle::ProtoDataProvider::ProtoVarSlot">ProtoVarSlot</a>&gt; <code class="descname">varDenseData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot12varDenseDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot10varIndicesE">
<span id="paddle::ProtoDataProvider::ProtoSlot::varIndices__std::vector:std::vector:i::"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a50c1ea83c76b671f1956361e5810df60"></span>std::vector&lt;std::vector&lt;int&gt;&gt; <code class="descname">varIndices</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot10varIndicesE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider9ProtoSlot7strDataE">
<span id="paddle::ProtoDataProvider::ProtoSlot::strData__std::vector:ss:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoSlot_1a71c48ff692d1bbedda4f905533a20476"></span>std::vector&lt;std::string&gt; <code class="descname">strData</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider9ProtoSlot7strDataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

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

<dl class="class">
<dt id="_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlotE">
<span id="paddle::ProtoDataProvider::ProtoVarSlot"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoVarSlot"></span><em class="property">struct </em><code class="descname">ProtoVarSlot</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlotE" title="Permalink to this definition"></a></dt>
1318
<dd><div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlot4dataE">
<span id="paddle::ProtoDataProvider::ProtoVarSlot::data__std::vector:real:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoVarSlot_1addc65504ff553e270d4c2ef43d853f77"></span>std::vector&lt;real&gt; <code class="descname">data</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlot4dataE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlot4dimsE">
<span id="paddle::ProtoDataProvider::ProtoVarSlot::dims__std::vector:i:"></span><span class="target" id="paddlestructpaddle_1_1ProtoDataProvider_1_1ProtoVarSlot_1aa4596a52f49c60014d51f26c05cc4ab6"></span>std::vector&lt;int&gt; <code class="descname">dims</code><a class="headerlink" href="#_CPPv2N6paddle17ProtoDataProvider12ProtoVarSlot4dimsE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

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

</dd></dl>

Y
Yu Yang 已提交
1335 1336 1337
</div>
<div class="section" id="protosequencedataprovider">
<h2>ProtoSequenceDataProvider<a class="headerlink" href="#protosequencedataprovider" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
1338 1339
<dl class="class">
<dt id="_CPPv2N6paddle25ProtoSequenceDataProviderE">
Y
Yu Yang 已提交
1340 1341 1342 1343
<span id="paddle::ProtoSequenceDataProvider"></span><span class="target" id="paddleclasspaddle_1_1ProtoSequenceDataProvider"></span><em class="property">class </em><code class="descclassname">paddle::</code><code class="descname">ProtoSequenceDataProvider</code><a class="headerlink" href="#_CPPv2N6paddle25ProtoSequenceDataProviderE" title="Permalink to this definition"></a></dt>
<dd><p>Special use for Proto data: instances should contain sparse-non-value slots and label. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
1344
<dd><a class="reference internal" href="#paddleclasspaddle_1_1ProtoSequenceDataProvider"><span class="std std-ref">ProtoSequenceDataProvider</span></a> treats each SPARSE SLOT as a SEQUENCE </dd>
Y
Yu Yang 已提交
1345 1346
</dl>
</p>
1347
<p>Inherits from <a class="reference internal" href="#paddleclasspaddle_1_1ProtoDataProvider"><span class="std std-ref">paddle::ProtoDataProvider</span></a></p>
1348
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6paddle25ProtoSequenceDataProvider25ProtoSequenceDataProviderERK10DataConfigbb">
<span id="paddle::ProtoSequenceDataProvider::ProtoSequenceDataProvider__DataConfigCR.b.b"></span><span class="target" id="paddleclasspaddle_1_1ProtoSequenceDataProvider_1acd224131500c8167cfc285e5caa2070a"></span><code class="descname">ProtoSequenceDataProvider</code><span class="sig-paren">(</span><em class="property">const</em> DataConfig &amp;<em>config</em>, bool <em>useGpu</em>, bool <em>loadDataAll</em> = true<span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle25ProtoSequenceDataProvider25ProtoSequenceDataProviderERK10DataConfigbb" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle25ProtoSequenceDataProviderD0Ev">
<span id="paddle::ProtoSequenceDataProvider::~ProtoSequenceDataProvider"></span><span class="target" id="paddleclasspaddle_1_1ProtoSequenceDataProvider_1ad7abd169d2ffd6fd6c630522288c776d"></span><code class="descname">~ProtoSequenceDataProvider</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle25ProtoSequenceDataProviderD0Ev" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6paddle25ProtoSequenceDataProvider20getNextBatchInternalE7int64_tP9DataBatch">
1362
<span id="paddle::ProtoSequenceDataProvider::getNextBatchInternal__int64_t.DataBatchP"></span><span class="target" id="paddleclasspaddle_1_1ProtoSequenceDataProvider_1a153ae716b4d8fec75cde272f76a18b2b"></span>int64_t <code class="descname">getNextBatchInternal</code><span class="sig-paren">(</span>int64_t <em>size</em>, DataBatch *<em>batch</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6paddle25ProtoSequenceDataProvider20getNextBatchInternalE7int64_tP9DataBatch" title="Permalink to this definition"></a></dt>
Y
Yu Yang 已提交
1363
<dd><p>Get next batch training samples internally. </p>
Y
Yu Yang 已提交
1364
<p><dl class="docutils">
Y
Yu Yang 已提交
1365 1366 1367
<dt><strong>Return</strong></dt>
<dd>actual size of obtained training samples </dd>
<dt><strong>Parameters</strong></dt>
1368 1369 1370
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">size</span></code>: size of training samples to get </li>
<li><code class="docutils literal"><span class="pre">batch</span></code>: a batch of training samples </li>
Y
Yu Yang 已提交
1371 1372
</ul>
</dd>
Y
Yu Yang 已提交
1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391
</dl>
</p>
</dd></dl>

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

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Data Providers</a><ul>
Y
Yu Yang 已提交
1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412
<li><a class="reference internal" href="#base-dataprovider">Base DataProvider</a></li>
<li><a class="reference internal" href="#dataprovidergroup">DataProviderGroup</a></li>
<li><a class="reference internal" href="#multidataprovider">MultiDataProvider</a></li>
</ul>
</li>
<li><a class="reference internal" href="#pydataprovider">PyDataProvider</a><ul>
<li><a class="reference internal" href="#ifieldscanner">IFieldScanner</a></li>
<li><a class="reference internal" href="#densescanner">DenseScanner</a></li>
<li><a class="reference internal" href="#indexscanner">IndexScanner</a></li>
<li><a class="reference internal" href="#sparsenonvaluescanner">SparseNonValueScanner</a></li>
<li><a class="reference internal" href="#sparsevaluescanner">SparseValueScanner</a></li>
<li><a class="reference internal" href="#sequencescanner">SequenceScanner</a></li>
<li><a class="reference internal" href="#ipydataprovidercache">IPyDataProviderCache</a></li>
<li><a class="reference internal" href="#nocachestrategy">NoCacheStrategy</a></li>
<li><a class="reference internal" href="#cacheonepassinmemory">CacheOnePassInMemory</a></li>
<li><a class="reference internal" href="#ipydataprovider">IPyDataProvider</a></li>
</ul>
</li>
<li><a class="reference internal" href="#proto-data-provider">Proto Data Provider</a><ul>
<li><a class="reference internal" href="#protodataprovider">ProtoDataProvider</a></li>
<li><a class="reference internal" href="#protosequencedataprovider">ProtoSequenceDataProvider</a></li>
Y
Yu Yang 已提交
1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Data Providers Documents</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../evaluators/index.html"
                        title="next chapter">Evaluators</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/source/gserver/dataprovider/dataproviders.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">
1433 1434
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
Y
Yu Yang 已提交
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458
      <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="../evaluators/index.html" title="Evaluators"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Data Providers Documents"
             >previous</a> |</li>
1459 1460 1461
        <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>
          <li class="nav-item nav-item-2"><a href="index.html" >Data Providers Documents</a> &#187;</li> 
Y
Yu Yang 已提交
1462 1463 1464
      </ul>
    </div>
    <div class="footer" role="contentinfo">
1465
        &#169; Copyright 2016, PaddlePaddle developers.
1466
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
Y
Yu Yang 已提交
1467 1468 1469
    </div>
  </body>
</html>