detail_introduction_en.html 30.8 KB
Newer Older
1 2


3 4


5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Detail Description &mdash; PaddlePaddle  documentation</title>
  

  
  

  

  
  
    

  

  
  
29
    <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
30 31 32
  

  
33

34 35
  
        <link rel="index" title="Index"
36 37 38
              href="../../genindex.html"/>
        <link rel="search" title="Search" href="../../search.html"/>
    <link rel="top" title="PaddlePaddle  documentation" href="../../index.html"/>
39
        <link rel="up" title="Set Command-line Parameters" href="index_en.html"/>
40
        <link rel="next" title="Distributed Training" href="../cluster/index_en.html"/>
41
        <link rel="prev" title="Argument Outline" href="arguments_en.html"/> 
42 43 44 45 46 47 48 49 50 51
<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>

52 53

  
54
  <script src="../../_static/js/modernizr.min.js"></script>
55 56 57 58 59

</head>

<body class="wy-body-for-nav" role="document">

60 61 62 63 64 65 66 67 68 69 70 71 72
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="../../index_en.html" class="icon icon-home"> PaddlePaddle
          

          
73 74
          </a>

75 76 77 78 79 80
          
            
            
          

          
81
<div role="search">
82
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
83 84 85 86
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
87
</div>
88 89

          
90 91 92 93
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
94 95 96 97 98 99 100 101 102 103 104 105 106 107
<nav class="doc-menu-vertical" role="navigation">

<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../getstarted/index_en.html">GET STARTED</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../getstarted/quickstart_en.html">Quick Start</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../getstarted/concepts/use_concepts_en.html">Basic Concept</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build_and_install/index_en.html">Install and Build</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../build_and_install/pip_install_en.html">Install using pip</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../build_and_install/docker_install_en.html">Run in Docker Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../build_and_install/build_from_source_en.html">Build from Sources</a></li>
</ul>
</li>
108
<li class="toctree-l1 current"><a class="reference internal" href="../index_en.html">HOW TO</a><ul class="current">
109 110 111
<li class="toctree-l2 current"><a class="reference internal" href="index_en.html">Set Command-line Parameters</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="use_case_en.html">Use Case</a></li>
<li class="toctree-l3"><a class="reference internal" href="arguments_en.html">Argument Outline</a></li>
112
<li class="toctree-l3 current"><a class="current reference internal" href="#">Detail Description</a></li>
113 114
</ul>
</li>
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
<li class="toctree-l2"><a class="reference internal" href="../cluster/index_en.html">Distributed Training</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../cluster/preparations_en.html">Preparations</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cluster/cmd_argument_en.html">Command-line arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cluster/multi_cluster/index_en.html">Use different clusters</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../cluster/multi_cluster/fabric_en.html">Fabric</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cluster/multi_cluster/openmpi_en.html">OpenMPI</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cluster/multi_cluster/k8s_en.html">Kubernetes</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cluster/multi_cluster/k8s_aws_en.html">Kubernetes on AWS</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../rnn/index_en.html">RNN Models</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../rnn/rnn_config_en.html">RNN Configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rnn/recurrent_group_en.html">Recurrent Group Tutorial</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rnn/hierarchical_layer_en.html">Layers supporting hierarchical sequence as input</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rnn/hrnn_rnn_api_compare_en.html">API comparision between RNN and hierarchical RNN</a></li>
132 133 134 135 136
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../optimization/gpu_profiling_en.html">Tune GPU Performance</a></li>
</ul>
</li>
137 138 139 140 141 142 143 144 145 146 147 148 149
<li class="toctree-l1"><a class="reference internal" href="../../dev/index_en.html">Development</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../dev/contribute_to_paddle_en.html">Contribute Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dev/write_docs_en.html">Contribute Documentation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../faq/index_en.html">FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../faq/build_and_install/index_en.html">Install, Build and Unit test</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../faq/model/index_en.html">Model Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../faq/parameter/index_en.html">Parameter Setting</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../faq/local/index_en.html">Local Training and Prediction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../faq/cluster/index_en.html">Cluster Training and Prediction</a></li>
</ul>
</li>
150 151
</ul>

152 153
</nav>

154 155
        </div>
      </div>
156 157
    </nav>

158
    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
159

160 161 162 163 164
      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../../index_en.html">PaddlePaddle</a>
      </nav>
165 166


167 168 169 170
      
      <div class="wy-nav-content">
        <div class="rst-content">
          
171

172
 
173 174 175 176 177



<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
178
    <li><a href="../../index_en.html">Docs</a> &raquo;</li>
179
      
180
          <li><a href="../index_en.html">HOW TO</a> &raquo;</li>
181
      
182
          <li><a href="index_en.html">Set Command-line Parameters</a> &raquo;</li>
183 184
      
    <li>Detail Description</li>
185 186 187 188 189 190 191
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/howto/cmd_parameter/detail_introduction_en.md.txt" rel="nofollow"> View page source</a>
          
        
      </li>
192
  </ul>
193
  <hr/>
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="detail-description">
<span id="detail-description"></span><span id="cmd-detail-introduction"></span><h1>Detail Description<a class="headerlink" href="#detail-description" title="Permalink to this headline"></a></h1>
<div class="section" id="common">
<span id="common"></span><h2>Common<a class="headerlink" href="#common" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--job</span></code><ul>
<li>Job mode, including: <strong>train, test, checkgrad</strong>, where checkgrad is mainly for developers and users do not need to care about.</li>
<li>type: string (default: train)</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--config</span></code><ul>
<li>Use to specfiy network configure file.</li>
<li>type: string (default: null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--use_gpu</span></code><ul>
<li>Whether to use GPU for training, false is cpu mode and true is gpu mode.</li>
<li>type: bool (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--local</span></code><ul>
<li>Whether the training is in local mode or not. True when training locally or using one node in cluster. False when using multiple machines in cluster.</li>
<li>type: bool (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--trainer_count</span></code><ul>
<li>Define the number of threads used in one machine. For example, trainer_count = 4, means use 4 GPU in GPU mode and 4 threads in CPU mode. Each thread (or GPU) is assigned to 1/4 samples in current batch. That is to say, if setting batch_size of 512 in trainer config, each thread train 128 samples.</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--num_passes</span></code><ul>
<li>When <code class="docutils literal"><span class="pre">--job=train</span></code>, means training for num_passes passes. One pass means training all samples in dataset one time. When <code class="docutils literal"><span class="pre">--job=test</span></code>, means testing data from model of test_pass to  model of (num_passes - 1).</li>
<li>type: int32 (default: 100).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--config_args</span></code><ul>
<li>arguments passed to config file. Format: key1=value1,key2=value2.</li>
<li>type: string (default: null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--version</span></code><ul>
<li>Whether to print version information.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--show_layer_stat</span></code><ul>
<li>Whether to show the statistics of each layer <strong>per batch</strong>.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="train">
<span id="train"></span><h2>Train<a class="headerlink" href="#train" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--log_period</span></code><ul>
<li>Log progress every log_period batches.</li>
<li>type: int32 (default: 100).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--dot_period</span></code><ul>
<li>Print &#8216;.&#8217; every dot_period batches.</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--saving_period</span></code><ul>
<li>Save parameters every saving_period passes</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--save_dir</span></code><ul>
<li>Directory for saving model parameters. It needs to be specified, but no need to be created in advance.</li>
<li>type: string (default: null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--start_pass</span></code><ul>
<li>Start training from this pass. It will load parameters from the previous pass.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--show_parameter_stats_period</span></code><ul>
<li>Show parameter statistic during training every show_parameter_stats_period batches. It will not show by default.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--save_only_one</span></code><ul>
<li>Save the parameters only in last pass, while the previous parameters will be removed.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--load_missing_parameter_strategy</span></code><ul>
<li>Specify the loading operation when model file is missing. Now support fail/rand/zero three operations.<ul>
<li><code class="docutils literal"><span class="pre">fail</span></code>: program will exit.</li>
<li><code class="docutils literal"><span class="pre">rand</span></code>: uniform or normal distribution according to <strong>initial_strategy</strong> in network config. Uniform range is: <strong>[mean - std, mean + std]</strong>, where mean and std are configures in trainer config.</li>
<li><code class="docutils literal"><span class="pre">zero</span></code>: all parameters are zero.</li>
</ul>
</li>
<li>type: string (default: fail).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--init_model_path</span></code><ul>
<li>Path of the initialization model. If it was set, start_pass will be ignored. It can be used to specify model path in testing mode as well.</li>
<li>type: string (default: null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--saving_period_by_batches</span></code><ul>
<li>Save parameters every saving_period_by_batches batches in one pass.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--log_error_clipping</span></code><ul>
<li>Whether to print error clipping log when setting <strong>error_clipping_threshold</strong> in layer config. If it is true, log will be printed in backward propagation <strong>per batch</strong>. This clipping effects on <strong>gradient of output</strong>.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--log_clipping</span></code><ul>
<li>Enable print log clipping or not when setting <strong>gradient_clipping_threshold</strong> in trainer config. This clipping effects on <strong>gradient w.r.t. (with respect to) weight</strong>.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--use_old_updater</span></code><ul>
<li>Whether to use the old RemoteParameterUpdater. Default use ConcurrentRemoteParameterUpdater. It is mainly for deverlopers and users usually do not need to care about.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--enable_grad_share</span></code><ul>
<li>threshold for enable gradient parameter, which is shared for batch multi-cpu training.</li>
<li>type: int32 (default: 100 * 1024 * 1024).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--grad_share_block_num</span></code><ul>
<li>block number of gradient parameter, which is shared for batch multi-cpu training.</li>
<li>type: int32 (default: 64).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="test">
<span id="test"></span><h2>Test<a class="headerlink" href="#test" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--test_pass</span></code><ul>
<li>Load parameter from this pass to test.</li>
<li>type: int32 (default: -1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--test_period</span></code><ul>
<li>if equal 0, do test on all test data at the end of each pass. While if equal non-zero, do test on all test data every test_period batches.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--test_wait</span></code>
&nbsp;- Whether to wait for parameter per pass if not exist. It can be used when user launch another process to perfom testing during the training process.<ul>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--model_list</span></code><ul>
<li>File that saves the model list when testing.</li>
<li>type: string (default: &#8220;&#8221;, null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--predict_output_dir</span></code><ul>
<li>Directory that saves the layer output. It is configured in Outputs() in network config. Default, this argument is null, meaning save nothing. Specify this directory if you want to save feature map of some layers in testing mode. Note that, layer outputs are values after activation function.</li>
<li>type: string (default: &#8220;&#8221;, null).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--average_test_period</span></code><ul>
<li>Do test on average parameter every <code class="docutils literal"><span class="pre">average_test_period</span></code> batches. It MUST be devided by FLAGS_log_period. Default 0 means do not test on average parameter.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--distribute_test</span></code><ul>
<li>Testing in distribute environment will merge results from multiple machines.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--predict_file</span></code><ul>
<li>File name for saving predicted result. Default, this argument is null, meaning save nothing. Now, this argument is only used in AucValidationLayer and PnpairValidationLayer, and saves predicted result every pass.</li>
<li>type: string (default: &#8220;&#8221;, null).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="gpu">
<span id="gpu"></span><h2>GPU<a class="headerlink" href="#gpu" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--gpu_id</span></code><ul>
<li>Which gpu core to use.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--allow_only_one_model_on_one_gpu</span></code><ul>
<li>If true, do not allow multiple models on one GPU device.</li>
<li>type: bool (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--parallel_nn</span></code><ul>
<li>Whether to use multi-thread to calculate one neural network or not. If false, use gpu_id specify which gpu core to use (the device property in trainer config will be ingored). If true, the gpu core is specified in trainer config (gpu_id will be ignored).</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--cudnn_dir</span></code><ul>
<li>Choose path to dynamic load NVIDIA CuDNN library, for instance, /usr/local/cuda/lib64. [Default]: LD_LIBRARY_PATH</li>
<li>type: string (default: &#8220;&#8221;, null)</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--cuda_dir</span></code><ul>
<li>Choose path to dynamic load NVIDIA CUDA library, for instance, /usr/local/cuda/lib64. [Default]: LD_LIBRARY_PATH</li>
<li>type: string (default: &#8220;&#8221;, null)</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--cudnn_conv_workspace_limit_in_mb</span></code><ul>
<li>Specify cuDNN max workspace limit, in units MB, 4096MB=4GB by default.</li>
<li>type: int32 (default: 4096MB=4GB)</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="nlp-rnn-lstm-gru">
<span id="nlp-rnn-lstm-gru"></span><h2>NLP: RNN/LSTM/GRU<a class="headerlink" href="#nlp-rnn-lstm-gru" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--rnn_use_batch</span></code><ul>
<li>Whether to use batch method for calculation in simple RecurrentLayer.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--prev_batch_state</span></code><ul>
<li>batch is continue with next batch.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--beam_size</span></code><ul>
<li>Beam search uses breadth-first search to build its search tree. At each level of the tree, it generates all successors of the states at the current level, sorting them in increasing order of heuristic cost. However, it only stores a predetermined number of best states at each level (called the beam size).</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--diy_beam_search_prob_so</span></code><ul>
<li>Specify shared dynamic library. It can be defined out of paddle by user.</li>
<li>type: string (default: &#8220;&#8221;, null).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="dataprovider">
<span id="dataprovider"></span><h2>DataProvider<a class="headerlink" href="#dataprovider" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--memory_threshold_on_load_data</span></code><ul>
<li>Stop loading data when memory is not sufficient.</li>
<li>type: double (default: 1.0).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="unit-test">
<span id="unit-test"></span><h2>Unit Test<a class="headerlink" href="#unit-test" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--checkgrad_eps</span></code><ul>
<li>parameter change size for checkgrad.</li>
<li>type: double (default: 1e-05).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="parameter-server-and-distributed-communication">
<span id="parameter-server-and-distributed-communication"></span><h2>Parameter Server and Distributed Communication<a class="headerlink" href="#parameter-server-and-distributed-communication" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--start_pserver</span></code><ul>
<li>Whether to start pserver (parameter server).</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--pservers</span></code><ul>
<li>Comma separated IP addresses of pservers.</li>
<li>type: string (default: &#8220;127.0.0.1&#8221;).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--port</span></code><ul>
<li>Listening port for pserver.</li>
<li>type: int32 (default: 20134).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--ports_num</span></code><ul>
<li>The ports number for parameter send, increment based on default port number.</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--trainer_id</span></code><ul>
<li>In distributed training, each trainer must be given an unique id ranging from 0 to num_trainers-1. Trainer 0 is the master trainer. User do not need to care this flag.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--num_gradient_servers</span></code><ul>
<li>Numbers of gradient servers. This arguments is set automatically in cluster submitting environment.</li>
<li>type: int32 (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--small_messages</span></code><ul>
<li>If message size is small, recommend set it True to enable quick ACK and no delay</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--sock_send_buf_size</span></code><ul>
<li>Restrict socket send buffer size. It can reduce network congestion if set carefully.</li>
<li>type: int32 (default: 1024 * 1024 * 40).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--sock_recv_buf_size</span></code><ul>
<li>Restrict socket recieve buffer size.</li>
<li>type: int32 (default: 1024 * 1024 * 40).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--parameter_block_size</span></code><ul>
<li>Parameter block size for pserver, will automatically calculate a suitable value if it&#8217;s not set.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--parameter_block_size_for_sparse</span></code><ul>
<li>Parameter block size for sparse update pserver, will automatically calculate a suitable value if it&#8217;s not set.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--log_period_server</span></code><ul>
<li>Log progress every log_period_server batches at pserver end.</li>
<li>type: int32 (default: 500).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--loadsave_parameters_in_pserver</span></code><ul>
<li>Load and save parameters in pserver. Only work when parameter set sparse_remote_update.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--pserver_num_threads</span></code><ul>
<li>number of threads for sync op exec.</li>
<li>type: bool (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--ports_num_for_sparse</span></code><ul>
<li>The ports number for parameter send, increment based on default (port + ports_num). It is used by sparse Tranning.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--nics</span></code><ul>
<li>Network device name for pservers, already set in cluster submitting environment.</li>
<li>type: string (default: &#8220;xgbe0,xgbe1&#8221;).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--rdma_tcp</span></code><ul>
<li>Use rdma or tcp transport protocol, already set in cluster submitting environment.</li>
<li>type: string (default: &#8220;tcp&#8221;).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="async-sgd">
<span id="async-sgd"></span><h2>Async SGD<a class="headerlink" href="#async-sgd" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--async_count</span></code><ul>
<li>Defined the asynchronous training length, if 0, then use synchronized training.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--async_lagged_ratio_min</span></code><ul>
<li>Control the minimize value of <code class="docutils literal"><span class="pre">config_.async_lagged_grad_discard_ratio()</span></code>.</li>
<li>type: double (default: 1.0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--async_lagged_ratio_default</span></code><ul>
<li>If async_lagged_grad_discard_ratio is not set in network config, use it as defalut value.</li>
<li>type: double (default: 1.5).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="performance-tuning">
<span id="performance-tuning"></span><h2>Performance Tuning<a class="headerlink" href="#performance-tuning" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--log_barrier_abstract</span></code><ul>
<li>If true, show abstract barrier performance information.</li>
<li>type: bool (default: 1).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--log_barrier_show_log</span></code><ul>
<li>If true, always show barrier abstract even with little gap.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--log_barrier_lowest_nodes</span></code><ul>
<li>How many lowest node will be logged.</li>
<li>type: int32 (default: 5).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--check_sparse_distribution_in_pserver</span></code><ul>
<li>Whether to check that the distribution of sparse parameter on all pservers is balanced.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--show_check_sparse_distribution_log</span></code><ul>
<li>show log details for sparse parameter distribution in pserver.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--check_sparse_distribution_batches</span></code><ul>
<li>Running sparse parameter distribution check every so many batches.</li>
<li>type: int32 (default: 100).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--check_sparse_distribution_ratio</span></code><ul>
<li>If parameters dispatched to different pservers have an unbalanced distribution for check_sparse_distribution_ratio *  check_sparse_distribution_batches times, crash program.</li>
<li>type: double (default: 0.6).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--check_sparse_distribution_unbalance_degree</span></code><ul>
<li>The ratio of maximum data size / minimun data size for different pserver.</li>
<li>type: double (default: 2).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="matrix-vector-randomnumber">
<span id="matrix-vector-randomnumber"></span><h2>Matrix/Vector/RandomNumber<a class="headerlink" href="#matrix-vector-randomnumber" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">--enable_parallel_vector</span></code><ul>
<li>threshold for enable parallel vector.</li>
<li>type: int32 (default: 0).</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--seed</span></code><ul>
<li>random number seed. 0 for srand(time)</li>
<li>type: int32 (default: 1)</li>
</ul>
</li>
<li><code class="docutils literal"><span class="pre">--thread_local_rand_use_global_seed</span></code><ul>
<li>Whether to use global seed in rand of thread local.</li>
<li>type: bool (default: 0).</li>
</ul>
</li>
</ul>
</div>
</div>


           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
644
        <a href="../cluster/index_en.html" class="btn btn-neutral float-right" title="Distributed Training" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
      
      
        <a href="arguments_en.html" class="btn btn-neutral" title="Argument Outline" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, PaddlePaddle developers.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
677
            URL_ROOT:'../../',
678 679 680
            VERSION:'',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
681
            HAS_SOURCE:  true
682 683
        };
    </script>
684 685 686
      <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>
687
      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
688

689 690 691 692
  

  
  
693
    <script type="text/javascript" src="../../_static/js/theme.js"></script>
694
  
695

696
  
697 698 699 700 701 702 703
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   
704 705

</body>
706
</html>