提交 01c4cf93 编写于 作者: B baiyfbupt

Deployed 09f99c9e with MkDocs version: 1.0.4

上级
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/img/favicon.ico">
<title>My Docs</title>
<link href="/css/bootstrap-custom.min.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="/js/jquery-1.10.2.min.js" defer></script>
<script src="/js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/.">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="/.">Welcome to MkDocs</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="/docs/">PaddleSlim</a>
</li>
<li >
<a href="/docs/table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="/docs/api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="/docs/api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="/docs/api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="/docs/api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="/docs/api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="/docs/api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="/docs/api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="/docs/tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="/docs/tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="/docs/tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="/docs/tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="/docs/tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row-fluid">
<div id="main-content" class="span12">
<h1 id="404-page-not-found" style="text-align: center">404</h1>
<p style="text-align: center"><strong>Page not found</strong></p>
</div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "/",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="/js/base.js" defer></script>
<script src="/search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
body {
padding-top: 70px;
}
/* Replacement for `body { background-attachment: fixed; }`, which has
performance issues when scrolling on large displays. See #1394. */
body::before {
content: ' ';
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: #f8f8f8;
background: url(../img/grid.png) repeat-x;
will-change: transform;
z-index: -1;
}
body > .container {
min-height: 400px;
}
ul.nav .main {
font-weight: bold;
}
.col-md-3 {
padding-left: 0;
z-index: 1;
}
.col-md-9 {
padding-bottom: 100px;
}
.source-links {
float: right;
}
.col-md-9 img {
max-width: 100%;
display: inline-block;
padding: 4px;
line-height: 1.428571429;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
margin: 20px auto 30px auto;
}
/*
* The code below adds some padding to the top of the current anchor target so
* that, when navigating to it, the header isn't hidden by the navbar at the
* top.
*/
:target::before {
content: "";
display: block;
margin-top: -75px;
height: 75px;
pointer-events: none;
}
h1 {
color: #444;
font-weight: 400;
font-size: 42px;
}
h2, h3, h4, h5, h6 {
color: #444;
font-weight: 300;
}
hr {
border-top: 1px solid #aaa;
}
pre, .rst-content tt {
max-width: 100%;
background: #fff;
border: solid 1px #e1e4e5;
color: #333;
overflow-x: auto;
}
code.code-large, .rst-content tt.code-large {
font-size: 90%;
}
code {
padding: 2px 5px;
background: #fff;
border: solid 1px #e1e4e5;
color: #333;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background: transparent;
border: none;
white-space: pre;
word-wrap: normal;
font-family: monospace,serif;
font-size: 12px;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #fff;
background-color: #333;
border-radius: 3px;
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}
a code {
color: #2FA4E7;
}
a:hover code, a:focus code {
color: #157AB5;
}
footer {
margin-top: 30px;
margin-bottom: 10px;
text-align: center;
font-weight: 200;
}
.modal-dialog {
margin-top: 60px;
}
/*
* Side navigation
*
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
* sections of docs content.
*/
/* By default it's not affixed in mobile views, so undo that */
.bs-sidebar.affix { /* csslint allow: adjoining-classes */
position: static;
}
.bs-sidebar.well { /* csslint allow: adjoining-classes */
padding: 0;
max-height: 90%;
overflow-y: auto;
}
/* First level of nav */
.bs-sidenav {
padding-top: 10px;
padding-bottom: 10px;
border-radius: 5px;
}
/* All levels of nav */
.bs-sidebar .nav > li > a {
display: block;
padding: 5px 20px;
z-index: 1;
}
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
text-decoration: none;
border-right: 1px solid;
}
.bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a,
.bs-sidebar .nav > .active:focus > a {
font-weight: bold;
background-color: transparent;
border-right: 1px solid;
}
/* Nav: second level (shown on .active) */
.bs-sidebar .nav .nav {
display: none; /* Hide by default, but at >768px, show it */
margin-bottom: 8px;
}
.bs-sidebar .nav .nav > li > a {
padding-top: 3px;
padding-bottom: 3px;
padding-left: 30px;
font-size: 90%;
}
/* Show and affix the side nav when space allows it */
@media (min-width: 992px) {
/* Workaround a Safari bug when zooming to < 100%
https://github.com/mkdocs/mkdocs/issues/1050 */
.col-md-9 {
box-sizing: border-box; /* csslint allow: box-sizing */
padding-left: 25%;
width: 100%;
}
.bs-sidebar .nav > .active > ul {
display: block;
}
/* Widen the fixed sidebar */
.bs-sidebar.affix, /* csslint allow: adjoining-classes */
.bs-sidebar.affix-bottom { /* csslint allow: adjoining-classes */
width: 213px;
}
.bs-sidebar.affix { /* csslint allow: adjoining-classes */
position: fixed; /* Undo the static from mobile first approach */
top: 80px;
}
.bs-sidebar.affix-bottom { /* csslint allow: adjoining-classes */
position: absolute; /* Undo the static from mobile first approach */
}
.bs-sidebar.affix-bottom .bs-sidenav, /* csslint allow: adjoining-classes */
.bs-sidebar.affix .bs-sidenav { /* csslint allow: adjoining-classes */
margin-top: 0;
margin-bottom: 0;
}
}
@media (min-width: 1200px) {
/* Widen the fixed sidebar again */
.bs-sidebar.affix-bottom, /* csslint allow: adjoining-classes */
.bs-sidebar.affix { /* csslint allow: adjoining-classes */
width: 263px;
}
}
.headerlink {
font-family: FontAwesome;
font-size: 14px;
display: none;
padding-left: .5em;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink{
display:inline-block;
}
.admonition {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
text-align: left;
}
.admonition.note { /* csslint allow: adjoining-classes */
color: #3a87ad;
background-color: #d9edf7;
border-color: #bce8f1;
}
.admonition.warning { /* csslint allow: adjoining-classes */
color: #c09853;
background-color: #fcf8e3;
border-color: #fbeed5;
}
.admonition.danger { /* csslint allow: adjoining-classes */
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7;
}
.admonition-title {
font-weight: bold;
text-align: left;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left { /* csslint allow: adjoining-classes */
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu { /* csslint allow: adjoining-classes */
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#555;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#2fa4e7;text-decoration:none}a:hover,a:focus{color:#157ab5;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:#317eac}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#2fa4e7}.text-primary:hover{color:#178acc}.text-warning{color:#c09853}.text-warning:hover{color:#a47e3c}.text-danger{color:#b94a48}.text-danger:hover{color:#953b39}.text-success{color:#468847}.text-success:hover{color:#356635}.text-info{color:#3a87ad}.text-info:hover{color:#2d6987}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.list-inline>li:first-child{padding-left:0}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small,blockquote .small{display:block;line-height:1.428571429;color:#999}blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small,blockquote.pull-right .small{text-align:right}blockquote.pull-right small:before,blockquote.pull-right .small:before{content:''}blockquote.pull-right small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.428571429}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}@media(min-width:768px){.container{width:750px}}@media(min-width:992px){.container{width:970px}}@media(min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666666666666%}.col-xs-10{width:83.33333333333334%}.col-xs-9{width:75%}.col-xs-8{width:66.66666666666666%}.col-xs-7{width:58.333333333333336%}.col-xs-6{width:50%}.col-xs-5{width:41.66666666666667%}.col-xs-4{width:33.33333333333333%}.col-xs-3{width:25%}.col-xs-2{width:16.666666666666664%}.col-xs-1{width:8.333333333333332%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666666666666%}.col-xs-pull-10{right:83.33333333333334%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666666666666%}.col-xs-pull-7{right:58.333333333333336%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666666666667%}.col-xs-pull-4{right:33.33333333333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.666666666666664%}.col-xs-pull-1{right:8.333333333333332%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666666666666%}.col-xs-push-10{left:83.33333333333334%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666666666666%}.col-xs-push-7{left:58.333333333333336%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666666666667%}.col-xs-push-4{left:33.33333333333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.666666666666664%}.col-xs-push-1{left:8.333333333333332%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666666666666%}.col-xs-offset-10{margin-left:83.33333333333334%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666666666666%}.col-xs-offset-7{margin-left:58.333333333333336%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666666666667%}.col-xs-offset-4{margin-left:33.33333333333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.666666666666664%}.col-xs-offset-1{margin-left:8.333333333333332%}.col-xs-offset-0{margin-left:0}@media(min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666666666666%}.col-sm-10{width:83.33333333333334%}.col-sm-9{width:75%}.col-sm-8{width:66.66666666666666%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-4{width:33.33333333333333%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666666666666%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666666666666%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-0{margin-left:0}}@media(min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666666666666%}.col-md-10{width:83.33333333333334%}.col-md-9{width:75%}.col-md-8{width:66.66666666666666%}.col-md-7{width:58.333333333333336%}.col-md-6{width:50%}.col-md-5{width:41.66666666666667%}.col-md-4{width:33.33333333333333%}.col-md-3{width:25%}.col-md-2{width:16.666666666666664%}.col-md-1{width:8.333333333333332%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666666666666%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666666666666%}.col-md-push-10{left:83.33333333333334%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666666666666%}.col-md-push-7{left:58.333333333333336%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666666666667%}.col-md-push-4{left:33.33333333333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.666666666666664%}.col-md-push-1{left:8.333333333333332%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666666666666%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-0{margin-left:0}}@media(min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666666666666%}.col-lg-10{width:83.33333333333334%}.col-lg-9{width:75%}.col-lg-8{width:66.66666666666666%}.col-lg-7{width:58.333333333333336%}.col-lg-6{width:50%}.col-lg-5{width:41.66666666666667%}.col-lg-4{width:33.33333333333333%}.col-lg-3{width:25%}.col-lg-2{width:16.666666666666664%}.col-lg-1{width:8.333333333333332%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666666666666%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666666666666%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>.active,.table>tbody>tr>.active,.table>tfoot>tr>.active,.table>thead>.active>td,.table>tbody>.active>td,.table>tfoot>.active>td,.table>thead>.active>th,.table>tbody>.active>th,.table>tfoot>.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>.active:hover,.table-hover>tbody>.active:hover>td,.table-hover>tbody>.active:hover>th{background-color:#e8e8e8}.table>thead>tr>.success,.table>tbody>tr>.success,.table>tfoot>tr>.success,.table>thead>.success>td,.table>tbody>.success>td,.table>tfoot>.success>td,.table>thead>.success>th,.table>tbody>.success>th,.table>tfoot>.success>th{background-color:#dff0d8}.table-hover>tbody>tr>.success:hover,.table-hover>tbody>.success:hover>td,.table-hover>tbody>.success:hover>th{background-color:#d0e9c6}.table>thead>tr>.danger,.table>tbody>tr>.danger,.table>tfoot>tr>.danger,.table>thead>.danger>td,.table>tbody>.danger>td,.table>tfoot>.danger>td,.table>thead>.danger>th,.table>tbody>.danger>th,.table>tfoot>.danger>th{background-color:#f2dede}.table-hover>tbody>tr>.danger:hover,.table-hover>tbody>.danger:hover>td,.table-hover>tbody>.danger:hover>th{background-color:#ebcccc}.table>thead>tr>.warning,.table>tbody>tr>.warning,.table>tfoot>tr>.warning,.table>thead>.warning>td,.table>tbody>.warning>td,.table>tfoot>.warning>td,.table>thead>.warning>th,.table>tbody>.warning>th,.table>tfoot>.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>.warning:hover,.table-hover>tbody>.warning:hover>td,.table-hover>tbody>.warning:hover>th{background-color:#faf2cc}@media(max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#555;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}output{display:block;padding-top:9px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:54px;padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:54px;line-height:54px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;background-color:#dff0d8;border-color:#468847}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#959595}@media(min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline select.form-control{width:auto}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:9px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:29px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-control-static{padding-top:9px}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:8px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#555;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#555;background-color:#fff;border-color:rgba(0,0,0,0.1)}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#555;background-color:#ebebeb;border-color:rgba(0,0,0,0.1)}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:rgba(0,0,0,0.1)}.btn-default .badge{color:#fff;background-color:#fff}.btn-primary{color:#fff;background-color:#2fa4e7;border-color:#2fa4e7}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#1990d5;border-color:#1684c2}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#2fa4e7;border-color:#2fa4e7}.btn-primary .badge{color:#2fa4e7;background-color:#fff}.btn-warning{color:#fff;background-color:#dd5600;border-color:#dd5600}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#b44600;border-color:#a03e00}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#dd5600;border-color:#dd5600}.btn-warning .badge{color:#dd5600;background-color:#fff}.btn-danger{color:#fff;background-color:#c71c22;border-color:#c71c22}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#a3171c;border-color:#911419}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#c71c22;border-color:#c71c22}.btn-danger .badge{color:#c71c22;background-color:#fff}.btn-success{color:#fff;background-color:#73a839;border-color:#73a839}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#5e8a2f;border-color:#547a29}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#73a839;border-color:#73a839}.btn-success .badge{color:#73a839;background-color:#fff}.btn-info{color:#fff;background-color:#033c73;border-color:#033c73}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#02274b;border-color:#011d37}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#033c73;border-color:#033c73}.btn-info .badge{color:#033c73;background-color:#fff}.btn-link{font-weight:normal;color:#2fa4e7;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#157ab5;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.glyphicon:empty{width:1em}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#fff;text-decoration:none;background-color:#2fa4e7}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#2fa4e7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:54px;padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:54px;line-height:54px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn:first-child>.btn{margin-right:-1px}.input-group-btn:last-child>.btn{margin-left:-1px}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#2fa4e7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#2fa4e7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:768px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media(min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media(min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media(min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:6px;margin-right:-15px;margin-bottom:6px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form select.form-control{width:auto}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media(min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#2fa4e7;border-color:#1995dc}.navbar-default .navbar-brand{color:#fff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#fff;background-color:none}.navbar-default .navbar-text{color:#ddd}.navbar-default .navbar-nav>li>a{color:#fff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#fff;background-color:#178acc}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#fff;background-color:#178acc}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ddd;background-color:transparent}.navbar-default .navbar-toggle{border-color:#178acc}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#178acc}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#1995dc}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#fff;background-color:#178acc}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#fff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:#178acc}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#178acc}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ddd;background-color:transparent}}.navbar-default .navbar-link{color:#fff}.navbar-default .navbar-link:hover{color:#fff}.navbar-inverse{background-color:#033c73;border-color:#022f5a}.navbar-inverse .navbar-brand{color:#fff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:none}.navbar-inverse .navbar-text{color:#fff}.navbar-inverse .navbar-nav>li>a{color:#fff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:#022f5a}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#022f5a}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#022f5a}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#022f5a}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#022a50}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#022f5a}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#fff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#fff}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:8px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#999;cursor:default;background-color:#f5f5f5;border-color:#f5f5f5}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:14px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#2fa4e7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#178acc}.label-success{background-color:#73a839}.label-success[href]:hover,.label-success[href]:focus{background-color:#59822c}.label-info{background-color:#033c73}.label-info[href]:hover,.label-info[href]:focus{background-color:#022241}.label-warning{background-color:#dd5600}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#aa4200}.label-danger{background-color:#c71c22}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#9a161a}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#2fa4e7;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{display:block;height:auto;max-width:100%;margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#2fa4e7}.thumbnail .caption{padding:9px;color:#555}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#2fa4e7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#73a839}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#033c73}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#dd5600}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#c71c22}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#2fa4e7;border-color:#2fa4e7}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e6f4fc}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child th,.panel>.table>tbody:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:last-child>th,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:last-child>td,.panel>.table-responsive>.table-bordered>thead>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#555;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#ddd}.panel-primary>.panel-heading{color:#fff;background-color:#2fa4e7;border-color:#ddd}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-success{border-color:#ddd}.panel-success>.panel-heading{color:#468847;background-color:#73a839;border-color:#ddd}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-warning{border-color:#ddd}.panel-warning>.panel-heading{color:#c09853;background-color:#dd5600;border-color:#ddd}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-danger{border-color:#ddd}.panel-danger>.panel-heading{color:#b94a48;background-color:#c71c22;border-color:#ddd}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-info{border-color:#ddd}.panel-info>.panel-heading{color:#3a87ad;background-color:#033c73;border-color:#ddd}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;z-index:1050;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:rgba(0,0,0,0.9);border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:rgba(0,0,0,0.9);border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:rgba(0,0,0,0.9);border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;outline:0;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicons-chevron-left,.carousel-control .glyphicons-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,tr.visible-xs,th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}table.visible-xs.visible-sm{display:table}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}table.visible-xs.visible-md{display:table}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}table.visible-xs.visible-lg{display:table}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm,tr.visible-sm,th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}table.visible-sm.visible-xs{display:table}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}table.visible-sm.visible-md{display:table}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}table.visible-sm.visible-lg{display:table}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md,tr.visible-md,th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}table.visible-md.visible-xs{display:table}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}table.visible-md.visible-sm{display:table}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}table.visible-md.visible-lg{display:table}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg,tr.visible-lg,th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}table.visible-lg.visible-xs{display:table}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}table.visible-lg.visible-sm{display:table}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}table.visible-lg.visible-md{display:table}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}table.hidden-xs{display:table}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs,tr.hidden-xs,th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm,tr.hidden-xs.hidden-sm,th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md,tr.hidden-xs.hidden-md,th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg,tr.hidden-xs.hidden-lg,th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}table.hidden-sm{display:table}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs,tr.hidden-sm.hidden-xs,th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-sm,tr.hidden-sm,th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md,tr.hidden-sm.hidden-md,th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg,tr.hidden-sm.hidden-lg,th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}table.hidden-md{display:table}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs,tr.hidden-md.hidden-xs,th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-md.hidden-sm,tr.hidden-md.hidden-sm,th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md,tr.hidden-md,th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg,tr.hidden-md.hidden-lg,th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}table.hidden-lg{display:table}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs,tr.hidden-lg.hidden-xs,th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm,tr.hidden-lg.hidden-sm,th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md,tr.hidden-lg.hidden-md,th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg,tr.hidden-lg,th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print,tr.visible-print,th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print,tr.hidden-print,th.hidden-print,td.hidden-print{display:none!important}}.navbar{background-image:-webkit-linear-gradient(#54b4eb,#2fa4e7 60%,#1d9ce5);background-image:linear-gradient(#54b4eb,#2fa4e7 60%,#1d9ce5);background-repeat:no-repeat;border-bottom:1px solid #178acc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb',endColorstr='#ff1d9ce5',GradientType=0);filter:none;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar .navbar-nav>li>a,.navbar-brand{text-shadow:0 1px 0 rgba(0,0,0,0.1)}.navbar-inverse{background-image:-webkit-linear-gradient(#04519b,#044687 60%,#033769);background-image:linear-gradient(#04519b,#044687 60%,#033769);background-repeat:no-repeat;border-bottom:1px solid #022241;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04519b',endColorstr='#ff033769',GradientType=0);filter:none}.btn{text-shadow:0 1px 0 rgba(0,0,0,0.1)}.btn .caret{border-top-color:#fff}.btn-default{background-image:-webkit-linear-gradient(#fff,#fff 60%,#f5f5f5);background-image:linear-gradient(#fff,#fff 60%,#f5f5f5);background-repeat:no-repeat;border-bottom:1px solid #e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff5f5f5',GradientType=0);filter:none}.btn-default:hover{color:#555}.btn-default .caret{border-top-color:#555}.btn-default{background-image:-webkit-linear-gradient(#fff,#fff 60%,#f5f5f5);background-image:linear-gradient(#fff,#fff 60%,#f5f5f5);background-repeat:no-repeat;border-bottom:1px solid #e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff5f5f5',GradientType=0);filter:none}.btn-primary{background-image:-webkit-linear-gradient(#54b4eb,#2fa4e7 60%,#1d9ce5);background-image:linear-gradient(#54b4eb,#2fa4e7 60%,#1d9ce5);background-repeat:no-repeat;border-bottom:1px solid #178acc;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb',endColorstr='#ff1d9ce5',GradientType=0);filter:none}.btn-success{background-image:-webkit-linear-gradient(#88c149,#73a839 60%,#699934);background-image:linear-gradient(#88c149,#73a839 60%,#699934);background-repeat:no-repeat;border-bottom:1px solid #59822c;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff88c149',endColorstr='#ff699934',GradientType=0);filter:none}.btn-info{background-image:-webkit-linear-gradient(#04519b,#033c73 60%,#02325f);background-image:linear-gradient(#04519b,#033c73 60%,#02325f);background-repeat:no-repeat;border-bottom:1px solid #022241;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04519b',endColorstr='#ff02325f',GradientType=0);filter:none}.btn-warning{background-image:-webkit-linear-gradient(#ff6707,#dd5600 60%,#c94e00);background-image:linear-gradient(#ff6707,#dd5600 60%,#c94e00);background-repeat:no-repeat;border-bottom:1px solid #aa4200;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff6707',endColorstr='#ffc94e00',GradientType=0);filter:none}.btn-danger{background-image:-webkit-linear-gradient(#e12b31,#c71c22 60%,#b5191f);background-image:linear-gradient(#e12b31,#c71c22 60%,#b5191f);background-repeat:no-repeat;border-bottom:1px solid #9a161a;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe12b31',endColorstr='#ffb5191f',GradientType=0);filter:none}.pagination .active>a,.pagination .active>a:hover{border-color:#ddd}.panel-primary .panel-heading,.panel-success .panel-heading,.panel-warning .panel-heading,.panel-danger .panel-heading,.panel-info .panel-heading,.panel-primary .panel-title,.panel-success .panel-title,.panel-warning .panel-title,.panel-danger .panel-title,.panel-info .panel-title{color:#fff}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}
\ No newline at end of file
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>模型分析API文档 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li class="active">
<a href="./">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../../table_latency/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../api_guide/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#api">模型分析API文档</a></li>
<li><a href="#flops">flops</a></li>
<li><a href="#model_size">model_size</a></li>
<li><a href="#tablelatencyevaluator">TableLatencyEvaluator</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="api">模型分析API文档</h1>
<h2 id="flops">flops</h2>
<blockquote>
<p>paddleslim.analysis.flops(program, detail=False) <a href="">源代码</a></p>
</blockquote>
<p>获得指定网络的每秒浮点运算次数(FLOPS)。</p>
<p><strong>参数:</strong></p>
<ul>
<li>
<p><strong>program(paddle.fluid.Program):</strong> 待分析的目标网络。更多关于Program的介绍请参考:<a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/fluid_cn/Program_cn.html#program">Program概念介绍</a></p>
</li>
<li>
<p><strong>detail(bool):</strong> 是否返回每个卷积层的FLOPS。默认为False。</p>
</li>
</ul>
<p><strong>返回值:</strong></p>
<ul>
<li>
<p><strong>flops(float):</strong> 整个网络的FLOPS。</p>
</li>
<li>
<p><strong>params2flops(dict):</strong> 每层卷积对应的FLOPS,其中key为卷积层参数名称,value为FLOPS值。</p>
</li>
</ul>
<p><strong>示例:</strong></p>
<pre><code>import paddle.fluid as fluid
from paddle.fluid.param_attr import ParamAttr
from paddleslim.analysis import flops
def conv_bn_layer(input,
num_filters,
filter_size,
name,
stride=1,
groups=1,
act=None):
conv = fluid.layers.conv2d(
input=input,
num_filters=num_filters,
filter_size=filter_size,
stride=stride,
padding=(filter_size - 1) // 2,
groups=groups,
act=None,
param_attr=ParamAttr(name=name + &quot;_weights&quot;),
bias_attr=False,
name=name + &quot;_out&quot;)
bn_name = name + &quot;_bn&quot;
return fluid.layers.batch_norm(
input=conv,
act=act,
name=bn_name + '_output',
param_attr=ParamAttr(name=bn_name + '_scale'),
bias_attr=ParamAttr(bn_name + '_offset'),
moving_mean_name=bn_name + '_mean',
moving_variance_name=bn_name + '_variance', )
main_program = fluid.Program()
startup_program = fluid.Program()
# X X O X O
# conv1--&gt;conv2--&gt;sum1--&gt;conv3--&gt;conv4--&gt;sum2--&gt;conv5--&gt;conv6
# | ^ | ^
# |____________| |____________________|
#
# X: prune output channels
# O: prune input channels
with fluid.program_guard(main_program, startup_program):
input = fluid.data(name=&quot;image&quot;, shape=[None, 3, 16, 16])
conv1 = conv_bn_layer(input, 8, 3, &quot;conv1&quot;)
conv2 = conv_bn_layer(conv1, 8, 3, &quot;conv2&quot;)
sum1 = conv1 + conv2
conv3 = conv_bn_layer(sum1, 8, 3, &quot;conv3&quot;)
conv4 = conv_bn_layer(conv3, 8, 3, &quot;conv4&quot;)
sum2 = conv4 + sum1
conv5 = conv_bn_layer(sum2, 8, 3, &quot;conv5&quot;)
conv6 = conv_bn_layer(conv5, 8, 3, &quot;conv6&quot;)
print(&quot;FLOPS: {}&quot;.format(flops(main_program)))
</code></pre>
<h2 id="model_size">model_size</h2>
<blockquote>
<p>paddleslim.analysis.model_size(program) <a href="">源代码</a></p>
</blockquote>
<p>获得指定网络的参数数量。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>program(paddle.fluid.Program):</strong> 待分析的目标网络。更多关于Program的介绍请参考:<a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/fluid_cn/Program_cn.html#program">Program概念介绍</a></li>
</ul>
<p><strong>返回值:</strong></p>
<ul>
<li><strong>model_size(int):</strong> 整个网络的参数数量。</li>
</ul>
<p><strong>示例:</strong></p>
<pre><code>import paddle.fluid as fluid
from paddle.fluid.param_attr import ParamAttr
from paddleslim.analysis import model_size
def conv_layer(input,
num_filters,
filter_size,
name,
stride=1,
groups=1,
act=None):
conv = fluid.layers.conv2d(
input=input,
num_filters=num_filters,
filter_size=filter_size,
stride=stride,
padding=(filter_size - 1) // 2,
groups=groups,
act=None,
param_attr=ParamAttr(name=name + &quot;_weights&quot;),
bias_attr=False,
name=name + &quot;_out&quot;)
return conv
main_program = fluid.Program()
startup_program = fluid.Program()
# X X O X O
# conv1--&gt;conv2--&gt;sum1--&gt;conv3--&gt;conv4--&gt;sum2--&gt;conv5--&gt;conv6
# | ^ | ^
# |____________| |____________________|
#
# X: prune output channels
# O: prune input channels
with fluid.program_guard(main_program, startup_program):
input = fluid.data(name=&quot;image&quot;, shape=[None, 3, 16, 16])
conv1 = conv_layer(input, 8, 3, &quot;conv1&quot;)
conv2 = conv_layer(conv1, 8, 3, &quot;conv2&quot;)
sum1 = conv1 + conv2
conv3 = conv_layer(sum1, 8, 3, &quot;conv3&quot;)
conv4 = conv_layer(conv3, 8, 3, &quot;conv4&quot;)
sum2 = conv4 + sum1
conv5 = conv_layer(sum2, 8, 3, &quot;conv5&quot;)
conv6 = conv_layer(conv5, 8, 3, &quot;conv6&quot;)
print(&quot;FLOPS: {}&quot;.format(model_size(main_program)))
</code></pre>
<h2 id="tablelatencyevaluator">TableLatencyEvaluator</h2>
<blockquote>
<p>paddleslim.analysis.TableLatencyEvaluator(table_file, delimiter=",") <a href="">源代码</a></p>
</blockquote>
<p>基于硬件延时表的模型延时评估器。</p>
<p><strong>参数:</strong></p>
<ul>
<li>
<p><strong>table_file(str):</strong> 所使用的延时评估表的绝对路径。关于演示评估表格式请参考:<a href="../paddleslim/analysis/table_latency.md">PaddleSlim硬件延时评估表格式</a></p>
</li>
<li>
<p><strong>delimiter(str):</strong> 硬件延时评估表中,操作信息之前所使用的分割符,默认为英文字符逗号。</p>
</li>
</ul>
<p><strong>返回值:</strong></p>
<ul>
<li><strong>Evaluator:</strong> 硬件延时评估器的实例。</li>
</ul>
<blockquote>
<p>paddleslim.analysis.TableLatencyEvaluator.latency(graph) <a href="">源代码</a></p>
</blockquote>
<p>获得指定网络的预估延时。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>graph(Program):</strong> 待预估的目标网络。</li>
</ul>
<p><strong>返回值:</strong></p>
<ul>
<li><strong>latency:</strong> 目标网络的预估延时。</li>
</ul></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>PaddleSlim API文档导航 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li class="active">
<a href="./">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../analysis_api/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../nas_api/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslim-api">PaddleSlim API文档导航</a></li>
<li><a href="#_1">模型分析</a></li>
<li><a href="#_2">卷积通道剪裁</a></li>
<li><a href="#_3">蒸馏</a></li>
<li><a href="#_5">小模型结构搜索</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslim-api">PaddleSlim API文档导航</h1>
<h2 id="_1"><a href="../analysis_api/">模型分析</a></h2>
<h2 id="_2"><a href="../prune_api/">卷积通道剪裁</a></h2>
<h2 id="_3"><a href="">蒸馏</a></h2>
<ul>
<li>
<p><a href="../single_distiller_api/">单进程蒸馏</a></p>
</li>
<li>
<p><a href="../prune_api/">通道剪裁</a></p>
</li>
</ul>
<h3 id="_4"><a href="../quantization_api/">量化</a></h3>
<ul>
<li>
<p><a href="../quantization_api/#量化训练API">量化训练</a></p>
</li>
<li>
<p><a href="../quantization_api/#离线量化API">离线量化</a></p>
</li>
<li>
<p><a href="../quantization_api/#Embedding量化API">embedding量化</a></p>
</li>
</ul>
<h2 id="_5"><a href="">小模型结构搜索</a></h2>
<ul>
<li><a href="../nas_api/">nas API</a></li>
<li><a href="../search_space/">SearchSpace</a></li>
</ul></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>paddleslim.nas API文档 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li class="active">
<a href="./">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../api_guide/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../prune_api/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslimnas-api">paddleslim.nas API文档</a></li>
<li><a href="#sanas-api">SANAS API文档</a></li>
<li><a href="#class-sanas">class SANAS</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslimnas-api">paddleslim.nas API文档</h1>
<h2 id="sanas-api">SANAS API文档</h2>
<h2 id="class-sanas">class SANAS</h2>
<p>SANAS(Simulated Annealing Neural Architecture Search)是基于模拟退火算法进行模型结构搜索的算法,一般用于离散搜索任务。</p>
<hr />
<blockquote>
<p>paddleslim.nas.SANAS(configs, server_addr, init_temperature, reduce_rate, search_steps, save_checkpoint, load_checkpoint, is_server)</p>
</blockquote>
<p><strong>参数:</strong>
- <strong>configs(list<tuple>):</strong> 搜索空间配置列表,格式是<code>[(key, {input_size, output_size, block_num, block_mask})]</code>或者<code>[(key)]</code>(MobileNetV2、MobilenetV1和ResNet的搜索空间使用和原本网络结构相同的搜索空间,所以仅需指定<code>key</code>即可), <code>input_size</code><code>output_size</code>表示输入和输出的特征图的大小,<code>block_num</code>是指搜索网络中的block数量,<code>block_mask</code>是一组由0和1组成的列表,0代表不进行下采样的block,1代表下采样的block。 更多paddleslim提供的搜索空间配置可以参考。
- <strong>server_addr(tuple):</strong> SANAS的地址,包括server的ip地址和端口号,如果ip地址为None或者为""的话则默认使用本机ip。默认:("", 8881)。
- <strong>init_temperature(float):</strong> 基于模拟退火进行搜索的初始温度。默认:100。
- <strong>reduce_rate(float):</strong> 基于模拟退火进行搜索的衰减率。默认:0.85。
- <strong>search_steps(int):</strong> 搜索过程迭代的次数。默认:300。
- <strong>save_checkpoint(str|None):</strong> 保存checkpoint的文件目录,如果设置为None的话则不保存checkpoint。默认:<code>./nas_checkpoint</code>
- <strong>load_checkpoint(str|None):</strong> 加载checkpoint的文件目录,如果设置为None的话则不加载checkpoint。默认:None。
- <strong>is_server(bool):</strong> 当前实例是否要启动一个server。默认:True。</p>
<p><strong>返回:</strong>
一个SANAS类的实例</p>
<p><strong>示例代码:</strong></p>
<pre><code>from paddleslim.nas import SANAS
config = [('MobileNetV2Space')]
sanas = SANAS(config=config)
</code></pre>
<hr />
<blockquote>
<p>tokens2arch(tokens)
通过一组token得到实际的模型结构,一般用来把搜索到最优的token转换为模型结构用来做最后的训练。</p>
</blockquote>
<p><strong>参数:</strong>
- <strong>tokens(list):</strong> 一组token。</p>
<p><strong>返回</strong>
返回一个模型结构实例。</p>
<p><strong>示例代码:</strong></p>
<pre><code>import paddle.fluid as fluid
input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32')
archs = sanas.token2arch(tokens)
for arch in archs:
output = arch(input)
input = output
</code></pre>
<hr />
<blockquote>
<p>next_archs():
获取下一组模型结构。</p>
</blockquote>
<p><strong>返回</strong>
返回模型结构实例的列表,形式为list。</p>
<p><strong>示例代码:</strong></p>
<pre><code>import paddle.fluid as fluid
input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32')
archs = sanas.next_archs()
for arch in archs:
output = arch(input)
input = output
</code></pre>
<hr />
<blockquote>
<p>reward(score):
把当前模型结构的得分情况回传。</p>
</blockquote>
<p><strong>参数:</strong>
<strong>score<float>:</strong> 当前模型的得分,分数越大越好。</p>
<p><strong>返回</strong>
模型结构更新成功或者失败,成功则返回<code>True</code>,失败则返回<code>False</code></p>
<p><strong>代码示例</strong></p>
<pre><code class="python">import numpy as np
import paddle
import paddle.fluid as fluid
from paddleslim.nas import SANAS
from paddleslim.analysis import flops
max_flops = 321208544
batch_size = 256
# 搜索空间配置
config=[('MobileNetV2Space')]
# 实例化SANAS
sa_nas = SANAS(config, server_addr=(&quot;&quot;, 8887), init_temperature=10.24, reduce_rate=0.85, search_steps=100, is_server=True)
for step in range(100):
archs = sa_nas.next_archs()
train_program = fluid.Program()
test_program = fluid.Program()
startup_program = fluid.Program()
### 构造训练program
with fluid.program_guard(train_program, startup_program):
image = fluid.data(name='image', shape=[None, 3, 32, 32], dtype='float32')
label = fluid.data(name='label', shape=[None, 1], dtype='int64')
for arch in archs:
output = arch(image)
out = fluid.layers.fc(output, size=10, act=&quot;softmax&quot;)
softmax_out = fluid.layers.softmax(input=out, use_cudnn=False)
cost = fluid.layers.cross_entropy(input=softmax_out, label=label)
avg_cost = fluid.layers.mean(cost)
acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1)
### 构造测试program
test_program = train_program.clone(for_test=True)
### 定义优化器
sgd = fluid.optimizer.SGD(learning_rate=1e-3)
sgd.minimize(avg_cost)
### 增加限制条件,如果没有则进行无限制搜索
if flops(train_program) &gt; max_flops:
continue
### 定义代码是在cpu上运行
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(startup_program)
### 定义训练输入数据
train_reader = paddle.batch(
paddle.reader.shuffle(
paddle.dataset.cifar.train10(cycle=False), buf_size=1024),
batch_size=batch_size,
drop_last=True)
### 定义预测输入数据
test_reader = paddle.batch(
paddle.dataset.cifar.test10(cycle=False),
batch_size=batch_size,
drop_last=False)
train_feeder = fluid.DataFeeder([image, label], place, program=train_program)
test_feeder = fluid.DataFeeder([image, label], place, program=test_program)
### 开始训练,每个搜索结果训练5个epoch
for epoch_id in range(5):
for batch_id, data in enumerate(train_reader()):
fetches = [avg_cost.name]
outs = exe.run(train_program,
feed=train_feeder.feed(data),
fetch_list=fetches)[0]
if batch_id % 10 == 0:
print('TRAIN: steps: {}, epoch: {}, batch: {}, cost: {}'.format(step, epoch_id, batch_id, outs[0]))
### 开始预测,得到最终的测试结果作为score回传给sa_nas
reward = []
for batch_id, data in enumerate(test_reader()):
test_fetches = [
avg_cost.name, acc_top1.name
]
batch_reward = exe.run(test_program,
feed=test_feeder.feed(data),
fetch_list=test_fetches)
reward_avg = np.mean(np.array(batch_reward), axis=1)
reward.append(reward_avg)
print('TEST: step: {}, batch: {}, avg_cost: {}, acc_top1: {}'.
format(step, batch_id, batch_reward[0],batch_reward[1]))
finally_reward = np.mean(np.array(reward), axis=0)
print(
'FINAL TEST: avg_cost: {}, acc_top1: {}'.format(
finally_reward[0], finally_reward[1]))
### 回传score
sa_nas.reward(float(finally_reward[1]))
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>卷积通道剪裁API文档 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li class="active">
<a href="./">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../nas_api/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../quantization_api/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#api">卷积通道剪裁API文档</a></li>
<li><a href="#class-pruner">class Pruner</a></li>
<li><a href="#sensitivity">sensitivity</a></li>
<li><a href="#merge_sensitive">merge_sensitive</a></li>
<li><a href="#load_sensitivities">load_sensitivities</a></li>
<li><a href="#get_ratios_by_losssensitivities-loss">get_ratios_by_loss(sensitivities, loss)</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="api">卷积通道剪裁API文档</h1>
<h2 id="class-pruner">class Pruner</h2>
<hr />
<blockquote>
<p>paddleslim.prune.Pruner(criterion="l1_norm")<a href="">源代码</a></p>
</blockquote>
<p>对卷积网络的通道进行一次剪裁。剪裁一个卷积层的通道,是指剪裁该卷积层输出的通道。卷积层的权重形状为<code>[output_channel, input_channel, kernel_size, kernel_size]</code>,通过剪裁该权重的第一纬度达到剪裁输出通道数的目的。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>criterion:</strong> 评估一个卷积层内通道重要性所参考的指标。目前仅支持<code>l1_norm</code>。默认为<code>l1_norm</code></li>
</ul>
<p><strong>返回:</strong> 一个Pruner类的实例</p>
<p><strong>示例代码:</strong></p>
<pre><code>from paddleslim.prune import Pruner
pruner = Pruner()
</code></pre>
<hr />
<blockquote>
<p>prune(program, scope, params, ratios, place=None, lazy=False, only_graph=False, param_backup=False, param_shape_backup=False)</p>
</blockquote>
<p>对目标网络的一组卷积层的权重进行裁剪。</p>
<p><strong>参数:</strong></p>
<ul>
<li>
<p><strong>program(paddle.fluid.Program):</strong> 要裁剪的目标网络。更多关于Program的介绍请参考:<a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/fluid_cn/Program_cn.html#program">Program概念介绍</a></p>
</li>
<li>
<p><strong>scope(paddle.fluid.Scope):</strong> 要裁剪的权重所在的<code>scope</code>,Paddle中用<code>scope</code>实例存放模型参数和运行时变量的值。Scope中的参数值会被<code>inplace</code>的裁剪。更多介绍请参考<a href="">Scope概念介绍</a></p>
</li>
<li>
<p><strong>params(list<str>):</strong> 需要被裁剪的卷积层的参数的名称列表。可以通过以下方式查看模型中所有参数的名称:</p>
</li>
</ul>
<pre><code>for block in program.blocks:
for param in block.all_parameters():
print(&quot;param: {}; shape: {}&quot;.format(param.name, param.shape))
</code></pre>
<ul>
<li>
<p><strong>ratios(list<float>):</strong> 用于裁剪<code>params</code>的剪切率,类型为列表。该列表长度必须与<code>params</code>的长度一致。</p>
</li>
<li>
<p><strong>place(paddle.fluid.Place):</strong> 待裁剪参数所在的设备位置,可以是<code>CUDAPlace</code><code>CPUPlace</code><a href="">Place概念介绍</a></p>
</li>
<li>
<p><strong>lazy(bool):</strong> <code>lazy</code>为True时,通过将指定通道的参数置零达到裁剪的目的,参数的<code>shape保持不变</code><code>lazy</code>为False时,直接将要裁的通道的参数删除,参数的<code>shape</code>会发生变化。</p>
</li>
<li>
<p><strong>only_graph(bool):</strong> 是否只裁剪网络结构。在Paddle中,Program定义了网络结构,Scope存储参数的数值。一个Scope实例可以被多个Program使用,比如定义了训练网络的Program和定义了测试网络的Program是使用同一个Scope实例的。<code>only_graph</code>为True时,只对Program中定义的卷积的通道进行剪裁;<code>only_graph</code>为false时,Scope中卷积参数的数值也会被剪裁。默认为False。</p>
</li>
<li>
<p><strong>param_backup(bool):</strong> 是否返回对参数值的备份。默认为False。</p>
</li>
<li>
<p><strong>param_shape_backup(bool):</strong> 是否返回对参数<code>shape</code>的备份。默认为False。</p>
</li>
</ul>
<p><strong>返回:</strong></p>
<ul>
<li>
<p><strong>pruned_program(paddle.fluid.Program):</strong> 被裁剪后的Program。</p>
</li>
<li>
<p><strong>param_backup(dict):</strong> 对参数数值的备份,用于恢复Scope中的参数数值。</p>
</li>
<li>
<p><strong>param_shape_backup(dict):</strong> 对参数形状的备份。</p>
</li>
</ul>
<p><strong>示例:</strong></p>
<p>点击<a href="https://aistudio.baidu.com/aistudio/projectDetail/200786">AIStudio</a>执行以下示例代码。</p>
<pre><code>
import paddle.fluid as fluid
from paddle.fluid.param_attr import ParamAttr
from paddleslim.prune import Pruner
def conv_bn_layer(input,
num_filters,
filter_size,
name,
stride=1,
groups=1,
act=None):
conv = fluid.layers.conv2d(
input=input,
num_filters=num_filters,
filter_size=filter_size,
stride=stride,
padding=(filter_size - 1) // 2,
groups=groups,
act=None,
param_attr=ParamAttr(name=name + &quot;_weights&quot;),
bias_attr=False,
name=name + &quot;_out&quot;)
bn_name = name + &quot;_bn&quot;
return fluid.layers.batch_norm(
input=conv,
act=act,
name=bn_name + '_output',
param_attr=ParamAttr(name=bn_name + '_scale'),
bias_attr=ParamAttr(bn_name + '_offset'),
moving_mean_name=bn_name + '_mean',
moving_variance_name=bn_name + '_variance', )
main_program = fluid.Program()
startup_program = fluid.Program()
# X X O X O
# conv1--&gt;conv2--&gt;sum1--&gt;conv3--&gt;conv4--&gt;sum2--&gt;conv5--&gt;conv6
# | ^ | ^
# |____________| |____________________|
#
# X: prune output channels
# O: prune input channels
with fluid.program_guard(main_program, startup_program):
input = fluid.data(name=&quot;image&quot;, shape=[None, 3, 16, 16])
conv1 = conv_bn_layer(input, 8, 3, &quot;conv1&quot;)
conv2 = conv_bn_layer(conv1, 8, 3, &quot;conv2&quot;)
sum1 = conv1 + conv2
conv3 = conv_bn_layer(sum1, 8, 3, &quot;conv3&quot;)
conv4 = conv_bn_layer(conv3, 8, 3, &quot;conv4&quot;)
sum2 = conv4 + sum1
conv5 = conv_bn_layer(sum2, 8, 3, &quot;conv5&quot;)
conv6 = conv_bn_layer(conv5, 8, 3, &quot;conv6&quot;)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
scope = fluid.Scope()
exe.run(startup_program, scope=scope)
pruner = Pruner()
main_program, _, _ = pruner.prune(
main_program,
scope,
params=[&quot;conv4_weights&quot;],
ratios=[0.5],
place=place,
lazy=False,
only_graph=False,
param_backup=False,
param_shape_backup=False)
for param in main_program.global_block().all_parameters():
if &quot;weights&quot; in param.name:
print(&quot;param name: {}; param shape: {}&quot;.format(param.name, param.shape))
</code></pre>
<hr />
<h2 id="sensitivity">sensitivity</h2>
<blockquote>
<p>paddleslim.prune.sensitivity(program, place, param_names, eval_func, sensitivities_file=None, pruned_ratios=None) <a href="">源代码</a></p>
</blockquote>
<p>计算网络中每个卷积层的敏感度。每个卷积层的敏感度信息统计方法为:依次剪掉当前卷积层不同比例的输出通道数,在测试集上计算剪裁后的精度损失。得到敏感度信息后,可以通过观察或其它方式确定每层卷积的剪裁率。</p>
<p><strong>参数:</strong></p>
<ul>
<li>
<p><strong>program(paddle.fluid.Program):</strong> 待评估的目标网络。更多关于Program的介绍请参考:<a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/fluid_cn/Program_cn.html#program">Program概念介绍</a></p>
</li>
<li>
<p><strong>place(paddle.fluid.Place):</strong> 待分析的参数所在的设备位置,可以是<code>CUDAPlace</code><code>CPUPlace</code><a href="">Place概念介绍</a></p>
</li>
<li>
<p><strong>param_names(list<str>):</strong> 待分析的卷积层的参数的名称列表。可以通过以下方式查看模型中所有参数的名称:</p>
</li>
</ul>
<pre><code>for block in program.blocks:
for param in block.all_parameters():
print(&quot;param: {}; shape: {}&quot;.format(param.name, param.shape))
</code></pre>
<ul>
<li>
<p><strong>eval_func(function):</strong> 用于评估裁剪后模型效果的回调函数。该回调函数接受被裁剪后的<code>program</code>为参数,返回一个表示当前program的精度,用以计算当前裁剪带来的精度损失。</p>
</li>
<li>
<p><strong>sensitivities_file(str):</strong> 保存敏感度信息的本地文件系统的文件。在敏感度计算过程中,会持续将新计算出的敏感度信息追加到该文件中。重启任务后,文件中已有敏感度信息不会被重复计算。该文件可以用<code>pickle</code>加载。</p>
</li>
<li>
<p><strong>pruned_ratios(list<float>):</strong> 计算卷积层敏感度信息时,依次剪掉的通道数比例。默认为[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]。</p>
</li>
</ul>
<p><strong>返回:</strong></p>
<ul>
<li><strong>sensitivities(dict):</strong> 存放敏感度信息的dict,其格式为:</li>
</ul>
<pre><code>{&quot;weight_0&quot;:
{0.1: 0.22,
0.2: 0.33
},
&quot;weight_1&quot;:
{0.1: 0.21,
0.2: 0.4
}
}
</code></pre>
<p>其中,<code>weight_0</code>是卷积层参数的名称,sensitivities['weight_0']的<code>value</code>为剪裁比例,<code>value</code>为精度损失的比例。</p>
<p><strong>示例:</strong></p>
<p>点击<a href="https://aistudio.baidu.com/aistudio/projectdetail/201401">AIStudio</a>运行以下示例代码。</p>
<pre><code>import paddle
import numpy as np
import paddle.fluid as fluid
from paddle.fluid.param_attr import ParamAttr
from paddleslim.prune import sensitivity
import paddle.dataset.mnist as reader
def conv_bn_layer(input,
num_filters,
filter_size,
name,
stride=1,
groups=1,
act=None):
conv = fluid.layers.conv2d(
input=input,
num_filters=num_filters,
filter_size=filter_size,
stride=stride,
padding=(filter_size - 1) // 2,
groups=groups,
act=None,
param_attr=ParamAttr(name=name + &quot;_weights&quot;),
bias_attr=False,
name=name + &quot;_out&quot;)
bn_name = name + &quot;_bn&quot;
return fluid.layers.batch_norm(
input=conv,
act=act,
name=bn_name + '_output',
param_attr=ParamAttr(name=bn_name + '_scale'),
bias_attr=ParamAttr(bn_name + '_offset'),
moving_mean_name=bn_name + '_mean',
moving_variance_name=bn_name + '_variance', )
main_program = fluid.Program()
startup_program = fluid.Program()
# X X O X O
# conv1--&gt;conv2--&gt;sum1--&gt;conv3--&gt;conv4--&gt;sum2--&gt;conv5--&gt;conv6
# | ^ | ^
# |____________| |____________________|
#
# X: prune output channels
# O: prune input channels
image_shape = [1,28,28]
with fluid.program_guard(main_program, startup_program):
image = fluid.data(name='image', shape=[None]+image_shape, dtype='float32')
label = fluid.data(name='label', shape=[None, 1], dtype='int64')
conv1 = conv_bn_layer(image, 8, 3, &quot;conv1&quot;)
conv2 = conv_bn_layer(conv1, 8, 3, &quot;conv2&quot;)
sum1 = conv1 + conv2
conv3 = conv_bn_layer(sum1, 8, 3, &quot;conv3&quot;)
conv4 = conv_bn_layer(conv3, 8, 3, &quot;conv4&quot;)
sum2 = conv4 + sum1
conv5 = conv_bn_layer(sum2, 8, 3, &quot;conv5&quot;)
conv6 = conv_bn_layer(conv5, 8, 3, &quot;conv6&quot;)
out = fluid.layers.fc(conv6, size=10, act=&quot;softmax&quot;)
# cost = fluid.layers.cross_entropy(input=out, label=label)
# avg_cost = fluid.layers.mean(x=cost)
acc_top1 = fluid.layers.accuracy(input=out, label=label, k=1)
# acc_top5 = fluid.layers.accuracy(input=out, label=label, k=5)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(startup_program)
val_reader = paddle.batch(reader.test(), batch_size=128)
val_feeder = feeder = fluid.DataFeeder(
[image, label], place, program=main_program)
def eval_func(program):
acc_top1_ns = []
for data in val_reader():
acc_top1_n = exe.run(program,
feed=val_feeder.feed(data),
fetch_list=[acc_top1.name])
acc_top1_ns.append(np.mean(acc_top1_n))
return np.mean(acc_top1_ns)
param_names = []
for param in main_program.global_block().all_parameters():
if &quot;weights&quot; in param.name:
param_names.append(param.name)
sensitivities = sensitivity(main_program,
place,
param_names,
eval_func,
sensitivities_file=&quot;./sensitive.data&quot;,
pruned_ratios=[0.1, 0.2, 0.3])
print(sensitivities)
</code></pre>
<h2 id="merge_sensitive">merge_sensitive</h2>
<blockquote>
<p>merge_sensitive(sensitivities)</p>
</blockquote>
<p>合并多个敏感度信息。</p>
<p>参数:</p>
<ul>
<li><strong>sensitivities(list<dict> | list<str>):</strong> 待合并的敏感度信息,可以是字典的列表,或者是存放敏感度信息的文件的路径列表。</li>
</ul>
<p>返回:</p>
<ul>
<li><strong>sensitivities(dict):</strong> 合并后的敏感度信息。其格式为:</li>
</ul>
<pre><code>{&quot;weight_0&quot;:
{0.1: 0.22,
0.2: 0.33
},
&quot;weight_1&quot;:
{0.1: 0.21,
0.2: 0.4
}
}
</code></pre>
<p>其中,<code>weight_0</code>是卷积层参数的名称,sensitivities['weight_0']的<code>value</code>为剪裁比例,<code>value</code>为精度损失的比例。</p>
<p>示例:</p>
<h2 id="load_sensitivities">load_sensitivities</h2>
<blockquote>
<p>load_sensitivities(sensitivities_file)</p>
</blockquote>
<p>从文件中加载敏感度信息。</p>
<p>参数:</p>
<ul>
<li><strong>sensitivities_file(str):</strong> 存放敏感度信息的本地文件.</li>
</ul>
<p>返回:</p>
<ul>
<li><strong>sensitivities(dict)</strong>敏感度信息。</li>
</ul>
<p>示例:</p>
<h2 id="get_ratios_by_losssensitivities-loss">get_ratios_by_loss(sensitivities, loss)</h2>
<p>根据敏感度和精度损失阈值计算出一组剪切率。对于参数<code>w</code>, 其剪裁率为使精度损失低于<code>loss</code>的最大剪裁率。</p>
<p>参数:</p>
<ul>
<li>
<p><strong>sensitivities(dict):</strong> 敏感度信息。</p>
</li>
<li>
<p><strong>loss:</strong> 精度损失阈值。</p>
</li>
</ul>
<p>返回:</p>
<ul>
<li>ratios(dict): 一组剪切率。<code>key</code>是待剪裁参数的名称。<code>value</code>是对应参数的剪裁率。</li>
</ul>
<p>示例:</p>
<pre><code>
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>paddleslim.quant API文档 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li class="active">
<a href="./">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../prune_api/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../search_space/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslimquant-api">paddleslim.quant API文档</a></li>
<li><a href="#api">量化训练API</a></li>
<li><a href="#api_1">离线量化API</a></li>
<li><a href="#embeddingapi">Embedding量化API</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslimquant-api">paddleslim.quant API文档</h1>
<h2 id="api">量化训练API</h2>
<h3 id="_1">量化配置</h3>
<pre><code>quant_config_default = {
'weight_quantize_type': 'abs_max',
'activation_quantize_type': 'abs_max',
'weight_bits': 8,
'activation_bits': 8,
# ops of name_scope in not_quant_pattern list, will not be quantized
'not_quant_pattern': ['skip_quant'],
# ops of type in quantize_op_types, will be quantized
'quantize_op_types':
['conv2d', 'depthwise_conv2d', 'mul', 'elementwise_add', 'pool2d'],
# data type after quantization, such as 'uint8', 'int8', etc. default is 'int8'
'dtype': 'int8',
# window size for 'range_abs_max' quantization. defaulf is 10000
'window_size': 10000,
# The decay coefficient of moving average, default is 0.9
'moving_rate': 0.9,
# if set quant_weight_only True, then only quantize parameters of layers which need to be quantized,
# and activations will not be quantized.
'quant_weight_only': False
}
</code></pre>
<p>设置量化训练需要的配置。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>weight_quantize_type(str)</strong> - 参数量化方式。可选<code>'abs_max'</code>, <code>'channel_wise_abs_max'</code>, <code>'range_abs_max'</code>, <code>'moving_average_abs_max'</code>。 默认<code>'abs_max'</code></li>
<li><strong>activation_quantize_type(str)</strong> - 激活量化方式,可选<code>'abs_max'</code>, <code>'range_abs_max'</code>, <code>'moving_average_abs_max'</code>,默认<code>'abs_max'</code></li>
<li><strong>weight_bits(int)</strong> - 参数量化bit数,默认8, 推荐设为8。</li>
<li><strong>activation_bits(int)</strong> - 激活量化bit数,默认8, 推荐设为8。</li>
<li><strong>not_quant_pattern(str or list[str])</strong> - 所有<code>name_scope</code>包含<code>'not_quant_pattern'</code>字符串的<code>op</code>,都不量化, 设置方式请参考<code>fluid.name_scope()</code></li>
<li><strong>quantize_op_types(list[str])</strong> - 需要进行量化的<code>op</code>类型,目前支持<code>'conv2d', 'depthwise_conv2d', 'mul'</code></li>
<li><strong>dtype(int8)</strong> - 量化后的参数类型,默认 <code>int8</code>, 目前仅支持<code>int8</code></li>
<li><strong>window_size(int)</strong> - <code>'range_abs_max'</code>量化方式的<code>window size</code>,默认10000。</li>
<li><strong>moving_rate(int)</strong> - <code>'moving_average_abs_max'</code>量化方式的衰减系数,默认 0.9。</li>
<li><strong>quant_weight_only(bool)</strong> - 是否只量化参数,如果设为<code>True</code>,则激活不进行量化,默认<code>False</code>。目前暂不支持设置为<code>True</code>。 设置为<code>True</code>时,只量化参数,这种方式不能减少显存占用和加速,只能用来减少带宽。</li>
</ul>
<h3 id="paddleslimquantquant_awareprogram-place-config-scopenone-for_testfalse">paddleslim.quant.quant_aware(program, place, config, scope=None, for_test=False)</h3>
<p><code>program</code>中加入量化和反量化<code>op</code>, 用于量化训练。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>program (fluid.Program)</strong> - 传入训练或测试<code>program</code></li>
<li><strong>place(fluid.CPUPlace or fluid.CUDAPlace)</strong> - 该参数表示<code>Executor</code>执行所在的设备。</li>
<li><strong>config(dict)</strong> - 量化配置表。</li>
<li><strong>scope(fluid.Scope, optional)</strong> - 传入用于存储<code>Variable</code><code>scope</code>,需要传入<code>program</code>所使用的<code>scope</code>,一般情况下,是<code>fluid.global_scope()</code>。设置为<code>None</code>时将使用<code>fluid.global_scope()</code>,默认值为<code>None</code></li>
<li><strong>for_test(bool)</strong> - 如果<code>program</code>参数是一个测试<code>program</code><code>for_test</code>应设为<code>True</code>,否则设为<code>False</code></li>
</ul>
<p><strong>返回</strong></p>
<p>含有量化和反量化<code>operator</code><code>program</code></p>
<p><strong>返回类型</strong></p>
<ul>
<li><code>for_test=False</code>,返回类型为<code>fluid.CompiledProgram</code><strong>注意,此返回值不能用于保存参数</strong></li>
<li><code>for_test=True</code>,返回类型为<code>fluid.Program</code></li>
</ul>
<p><strong>注意事项</strong></p>
<ul>
<li>此接口会改变<code>program</code>结构,并且可能增加一些<code>persistable</code>的变量,所以加载模型参数时请注意和相应的<code>program</code>对应。</li>
<li>此接口底层经历了<code>fluid.Program</code>-&gt; <code>fluid.framework.IrGraph</code>-&gt;<code>fluid.Program</code>的转变,在<code>fluid.framework.IrGraph</code>中没有<code>Parameter</code>的概念,<code>Variable</code>只有<code>persistable</code><code>not persistable</code>的区别,所以在保存和加载参数时,请使用<code>fluid.io.save_persistables</code><code>fluid.io.load_persistables</code>接口。</li>
<li>由于此接口会根据<code>program</code>的结构和量化配置来对<code>program</code>添加op,所以<code>Paddle</code>中一些通过<code>fuse op</code>来加速训练的策略不能使用。已知以下策略在使用量化时必须设为<code>False</code><code>fuse_all_reduce_ops, sync_batch_norm</code></li>
<li>如果传入的<code>program</code>中存在和任何op都没有连接的<code>Variable</code>,则会在量化的过程中被优化掉。</li>
</ul>
<h3 id="paddleslimquantconvertprogram-place-config-scopenone-save_int8false">paddleslim.quant.convert(program, place, config, scope=None, save_int8=False)</h3>
<p>把训练好的量化<code>program</code>,转换为可用于保存<code>inference model</code><code>program</code></p>
<p><strong>参数:</strong>
- <strong>program (fluid.Program)</strong> - 传入测试<code>program</code>
- <strong>place(fluid.CPUPlace or fluid.CUDAPlace)</strong> - 该参数表示<code>Executor</code>执行所在的设备。
- <strong>config(dict)</strong> - 量化配置表。
- <strong>scope(fluid.Scope)</strong> - 传入用于存储<code>Variable</code><code>scope</code>,需要传入<code>program</code>所使用的<code>scope</code>,一般情况下,是<code>fluid.global_scope()</code>。设置为<code>None</code>时将使用<code>fluid.global_scope()</code>,默认值为<code>None</code>
- <strong>save_int8(bool)</strong> - 是否需要返回参数为<code>int8</code><code>program</code>。该功能目前只能用于确认模型大小。默认值为<code>False</code></p>
<p><strong>返回</strong></p>
<ul>
<li><strong>program (fluid.Program)</strong> - freezed program,可用于保存inference model,参数为<code>float32</code>类型,但其数值范围可用int8表示。</li>
<li><strong>int8_program (fluid.Program)</strong> - freezed program,可用于保存inference model,参数为<code>int8</code>类型。当<code>save_int8</code><code>False</code>时,不返回该值。</li>
</ul>
<p><strong>注意事项</strong></p>
<p>因为该接口会对<code>op</code><code>Variable</code>做相应的删除和修改,所以此接口只能在训练完成之后调用。如果想转化训练的中间模型,可加载相应的参数之后再使用此接口。</p>
<p><strong>代码示例</strong></p>
<pre><code class="python">#encoding=utf8
import paddle.fluid as fluid
import paddleslim.quant as quant
train_program = fluid.Program()
with fluid.program_guard(train_program):
image = fluid.data(name='x', shape=[None, 1, 28, 28])
label = fluid.data(name='label', shape=[None, 1], dtype='int64')
conv = fluid.layers.conv2d(image, 32, 1)
feat = fluid.layers.fc(conv, 10, act='softmax')
cost = fluid.layers.cross_entropy(input=feat, label=label)
avg_cost = fluid.layers.mean(x=cost)
use_gpu = True
place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(fluid.default_startup_program())
eval_program = train_program.clone(for_test=True)
#配置
config = {'weight_quantize_type': 'abs_max',
'activation_quantize_type': 'moving_average_abs_max'}
build_strategy = fluid.BuildStrategy()
exec_strategy = fluid.ExecutionStrategy()
#调用api
quant_train_program = quant.quant_aware(train_program, place, config, for_test=False)
quant_eval_program = quant.quant_aware(eval_program, place, config, for_test=True)
#关闭策略
build_strategy.fuse_all_reduce_ops = False
build_strategy.sync_batch_norm = False
quant_train_program = quant_train_program.with_data_parallel(
loss_name=avg_cost.name,
build_strategy=build_strategy,
exec_strategy=exec_strategy)
inference_prog = quant.convert(quant_eval_program, place, config)
</code></pre>
<p>更详细的用法请参考 <a href='../../demo/quant/quant_aware/README.md'>量化训练demo</a></p>
<h2 id="api_1">离线量化API</h2>
<pre><code>paddleslim.quant.quant_post(executor,
model_dir,
quantize_model_path,
sample_generator,
model_filename=None,
params_filename=None,
batch_size=16,
batch_nums=None,
scope=None,
algo='KL',
quantizable_op_type=[&quot;conv2d&quot;, &quot;depthwise_conv2d&quot;, &quot;mul&quot;])
</code></pre>
<p>对保存在<code>${model_dir}</code>下的模型进行量化,使用<code>sample_generator</code>的数据进行参数校正。</p>
<p><strong>参数:</strong>
- <strong>executor (fluid.Executor)</strong> - 执行模型的executor,可以在cpu或者gpu上执行。
- <strong>model_dir(str)</strong> - 需要量化的模型所在的文件夹。
- <strong>quantize_model_path(str)</strong> - 保存量化后的模型的路径
- <strong>sample_generator(python generator)</strong> - 读取数据样本,每次返回一个样本。
- <strong>model_filename(str, optional)</strong> - 模型文件名,如果需要量化的模型的参数存在一个文件中,则需要设置<code>model_filename</code>为模型文件的名称,否则设置为<code>None</code>即可。默认值是<code>None</code>
- <strong>params_filename(str)</strong> - 参数文件名,如果需要量化的模型的参数存在一个文件中,则需要设置<code>params_filename</code>为参数文件的名称,否则设置为<code>None</code>即可。默认值是<code>None</code>
- <strong>batch_size(int)</strong> - 每个batch的图片数量。默认值为16 。
- <strong>batch_nums(int, optional)</strong> - 迭代次数。如果设置为<code>None</code>,则会一直运行到<code>sample_generator</code> 迭代结束, 否则,迭代次数为<code>batch_nums</code>, 也就是说参与对<code>Scale</code>进行校正的样本个数为 <code>'batch_nums' * 'batch_size'</code>.
- <strong>scope(fluid.Scope, optional)</strong> - 用来获取和写入<code>Variable</code>, 如果设置为<code>None</code>,则使用<code>fluid.global_scope()</code>. 默认值是<code>None</code>.
- <strong>algo(str)</strong> - 量化时使用的算法名称,可为<code>'KL'</code>或者<code>'direct'</code>。该参数仅针对激活值的量化,因为参数值的量化使用的方式为<code>'channel_wise_abs_max'</code>. 当<code>algo</code> 设置为<code>'direct'</code>时,使用校正数据的激活值的绝对值的最大值当作<code>Scale</code>值,当设置为<code>'KL'</code>时,则使用<code>KL</code>散度的方法来计算<code>Scale</code>值。默认值为<code>'KL'</code>
- <strong>quantizable_op_type(list[str])</strong> - 需要量化的<code>op</code>类型列表。默认值为<code>["conv2d", "depthwise_conv2d", "mul"]</code></p>
<p><strong>返回</strong></p>
<p>无。</p>
<p><strong>注意事项</strong></p>
<p>因为该接口会收集校正数据的所有的激活值,所以使用的校正图片不能太多。<code>'KL'</code>散度的计算也比较耗时。</p>
<p><strong>代码示例</strong></p>
<blockquote>
<p>注: 此示例不能直接运行,因为需要加载<code>${model_dir}</code>下的模型,所以不能直接运行。</p>
</blockquote>
<pre><code class="python">import paddle.fluid as fluid
import paddle.dataset.mnist as reader
from paddleslim.quant import quant_post
val_reader = reader.train()
use_gpu = True
place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace()
exe = fluid.Executor(place)
quant_post(
executor=exe,
model_dir='./model_path',
quantize_model_path='./save_path',
sample_generator=val_reader,
model_filename='__model__',
params_filename='__params__',
batch_size=16,
batch_nums=10)
</code></pre>
<p>更详细的用法请参考 <a href='../../demo/quant/quant_post/README.md'>离线量化demo</a></p>
<h2 id="embeddingapi">Embedding量化API</h2>
<pre><code>paddleslim.quant.quant_embedding(program, place, config, scope=None)
</code></pre>
<p><code>Embedding</code>参数进行量化。</p>
<p><strong>参数:</strong>
- <strong>program(fluid.Program)</strong> - 需要量化的program
- <strong>scope(fluid.Scope, optional)</strong> - 用来获取和写入<code>Variable</code>, 如果设置为<code>None</code>,则使用<code>fluid.global_scope()</code>.
- <strong>place(fluid.CPUPlace or fluid.CUDAPlace)</strong> - 运行program的设备
- <strong>config(dict)</strong> - 定义量化的配置。可以配置的参数有:
- <code>'params_name'</code> (str, required): 需要进行量化的参数名称,此参数必须设置。
- <code>'quantize_type'</code> (str, optional): 量化的类型,目前支持的类型是<code>'abs_max'</code>, 待支持的类型有 <code>'log', 'product_quantization'</code>。 默认值是<code>'abs_max'</code>.
- <code>'quantize_bits'</code>(int, optional): 量化的<code>bit</code>数,目前支持的<code>bit</code>数为8。默认值是8.
- <code>'dtype'</code>(str, optional): 量化之后的数据类型, 目前支持的是<code>'int8'</code>. 默认值是<code>int8</code>
- <code>'threshold'</code>(float, optional): 量化之前将根据此阈值对需要量化的参数值进行<code>clip</code>. 如果不设置,则跳过<code>clip</code>过程直接量化。</p>
<p><strong>返回</strong></p>
<p>量化之后的program</p>
<p><strong>返回类型</strong></p>
<p><code>fluid.Program</code></p>
<p><strong>代码示例</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.quant as quant
train_program = fluid.Program()
with fluid.program_guard(train_program):
input_word = fluid.data(name=&quot;input_word&quot;, shape=[None, 1], dtype='int64')
input_emb = fluid.embedding(
input=input_word,
is_sparse=False,
size=[100, 128],
param_attr=fluid.ParamAttr(name='emb',
initializer=fluid.initializer.Uniform(-0.005, 0.005)))
infer_program = train_program.clone(for_test=True)
use_gpu = True
place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(fluid.default_startup_program())
config = {'params_name': 'emb', 'quantize_type': 'abs_max'}
quant_program = quant.quant_embedding(infer_program, place, config)
</code></pre>
<p>更详细的用法请参考 <a href='../../demo/quant/quant_embedding/README.md'>Embedding量化demo</a></p></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>paddleslim.nas 提供的搜索空间: - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li class="active">
<a href="./">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../quantization_api/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../single_distiller_api/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslimnas">paddleslim.nas 提供的搜索空间:</a></li>
<li><a href="#_1">搜索空间的配置介绍:</a></li>
<li><a href="#_2">搜索空间示例:</a></li>
<li class="main "><a href="#search-space">自定义搜索空间(search space)</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslimnas">paddleslim.nas 提供的搜索空间:</h1>
<ol>
<li>根据原本模型结构构造搜索空间:</li>
</ol>
<p>1.1 MobileNetV2Space</p>
<p>1.2 MobileNetV1Space</p>
<p>1.3 ResNetSpace</p>
<ol>
<li>根据相应模型的block构造搜索空间</li>
</ol>
<p>2.1 MobileNetV1BlockSpace</p>
<p>2.2 MobileNetV2BlockSpace</p>
<p>2.3 ResNetBlockSpace</p>
<p>2.4 InceptionABlockSpace</p>
<p>2.5 InceptionCBlockSpace</p>
<h2 id="_1">搜索空间的配置介绍:</h2>
<p><strong>input_size(int|None)</strong><code>input_size</code>表示输入feature map的大小。
<strong>output_size(int|None)</strong><code>output_size</code>表示输出feature map的大小。
<strong>block_num(int|None)</strong><code>block_num</code>表示搜索空间中block的数量。
<strong>block_mask(list|None)</strong><code>block_mask</code>表示当前的block是一个reduction block还是一个normal block,是一组由0、1组成的列表,0表示当前block是normal block,1表示当前block是reduction block。如果设置了<code>block_mask</code>,则主要以<code>block_mask</code>为主要配置,<code>input_size</code><code>output_size</code><code>block_num</code>三种配置是无效的。</p>
<p><strong>Note:</strong>
1. reduction block表示经过这个block之后的feature map大小下降为之前的一半,normal block表示经过这个block之后feature map大小不变。
2. <code>input_size</code><code>output_size</code>用来计算整个模型结构中reduction block数量。</p>
<h2 id="_2">搜索空间示例:</h2>
<ol>
<li>使用paddleslim中提供用原本的模型结构来构造搜索空间的话,仅需要指定搜索空间名字即可。例如:如果使用原本的MobileNetV2的搜索空间进行搜索的话,传入SANAS中的config直接指定为[('MobileNetV2Space')]。</li>
<li>使用paddleslim中提供的block搜索空间构造搜索空间:
2.1 使用<code>input_size</code>, <code>output_size</code><code>block_num</code>来构造搜索空间。例如:传入SANAS的config可以指定为[('MobileNetV2BlockSpace', {'input_size': 224, 'output_size': 32, 'block_num': 10})]。
2.2 使用<code>block_mask</code>构造搜索空间。例如:传入SANAS的config可以指定为[('MobileNetV2BlockSpace', {'block_mask': [0, 1, 1, 1, 1, 0, 1, 0]})]。</li>
</ol>
<h1 id="search-space">自定义搜索空间(search space)</h1>
<p>自定义搜索空间类需要继承搜索空间基类并重写以下几部分:
1. 初始化的tokens(<code>init_tokens</code>函数),可以设置为自己想要的tokens列表, tokens列表中的每个数字指的是当前数字在相应的搜索列表中的索引。例如本示例中若tokens=[0, 3, 5],则代表当前模型结构搜索到的通道数为[8, 40, 128]。
2. token中每个数字的搜索列表长度(<code>range_table</code>函数),tokens中每个token的索引范围。
3. 根据token产生模型结构(<code>token2arch</code>函数),根据搜索到的tokens列表产生模型结构。</p>
<p>以新增reset block为例说明如何构造自己的search space。自定义的search space不能和已有的search space同名。</p>
<pre><code class="python">### 引入搜索空间基类函数和search space的注册类函数
from .search_space_base import SearchSpaceBase
from .search_space_registry import SEARCHSPACE
import numpy as np
### 需要调用注册函数把自定义搜索空间注册到space space中
@SEARCHSPACE.register
### 定义一个继承SearchSpaceBase基类的搜索空间的类函数
class ResNetBlockSpace2(SearchSpaceBase):
def __init__(self, input_size, output_size, block_num, block_mask):
### 定义一些实际想要搜索的内容,例如:通道数、每个卷积的重复次数、卷积核大小等等
### self.filter_num 代表通道数的搜索列表
self.filter_num = np.array([8, 16, 32, 40, 64, 128, 256, 512])
### 定义初始化token,初始化token的长度根据传入的block_num或者block_mask的长度来得到的
def init_tokens(self):
return [0] * 3 * len(self.block_mask)
### 定义
def range_table(self):
return [len(self.filter_num)] * 3 * len(self.block_mask)
def token2arch(self, tokens=None):
if tokens == None:
tokens = self.init_tokens()
self.bottleneck_params_list = []
for i in range(len(self.block_mask)):
self.bottleneck_params_list.append(self.filter_num[tokens[i * 3 + 0]],
self.filter_num[tokens[i * 3 + 1]],
self.filter_num[tokens[i * 3 + 2]],
2 if self.block_mask[i] == 1 else 1)
def net_arch(input):
for i, layer_setting in enumerate(self.bottleneck_params_list):
channel_num, stride = layer_setting[:-1], layer_setting[-1]
input = self._resnet_block(input, channel_num, stride, name='resnet_layer{}'.format(i+1))
return input
return net_arch
### 构造具体block的操作
def _resnet_block(self, input, channel_num, stride, name=None):
shortcut_conv = self._shortcut(input, channel_num[2], stride, name=name)
input = self._conv_bn_layer(input=input, num_filters=channel_num[0], filter_size=1, act='relu', name=name + '_conv0')
input = self._conv_bn_layer(input=input, num_filters=channel_num[1], filter_size=3, stride=stride, act='relu', name=name + '_conv1')
input = self._conv_bn_layer(input=input, num_filters=channel_num[2], filter_size=1, name=name + '_conv2')
return fluid.layers.elementwise_add(x=shortcut_conv, y=input, axis=0, name=name+'_elementwise_add')
def _shortcut(self, input, channel_num, stride, name=None):
channel_in = input.shape[1]
if channel_in != channel_num or stride != 1:
return self.conv_bn_layer(input, num_filters=channel_num, filter_size=1, stride=stride, name=name+'_shortcut')
else:
return input
def _conv_bn_layer(self, input, num_filters, filter_size, stride=1, padding='SAME', act=None, name=None):
conv = fluid.layers.conv2d(input, num_filters, filter_size, stride, name=name+'_conv')
bn = fluid.layers.batch_norm(conv, act=act, name=name+'_bn')
return bn
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>paddleslim.dist API文档 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li class="active">
<a href="./">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../search_space/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../../tutorials/demo_guide/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslimdist-api">paddleslim.dist API文档</a></li>
<li><a href="#mergeteacher_program-student_program-data_name_map-place-scopefluidglobal_scope-name_prefixteacher_">merge(teacher_program, student_program, data_name_map, place, scope=fluid.global_scope(), name_prefix='teacher_')</a></li>
<li><a href="#fsp_lossteacher_var1_name-teacher_var2_name-student_var1_name-student_var2_name-programfluiddefault_main_program">fsp_loss(teacher_var1_name, teacher_var2_name, student_var1_name, student_var2_name, program=fluid.default_main_program())</a></li>
<li><a href="#l2_lossteacher_var_name-student_var_name-programfluiddefault_main_program">l2_loss(teacher_var_name, student_var_name, program=fluid.default_main_program())</a></li>
<li><a href="#soft_label_lossteacher_var_name-student_var_name-programfluiddefault_main_program-teacher_temperature1-student_temperature1">soft_label_loss(teacher_var_name, student_var_name, program=fluid.default_main_program(), teacher_temperature=1., student_temperature=1.)</a></li>
<li><a href="#lossloss_func-programfluiddefault_main_program-kwargs">loss(loss_func, program=fluid.default_main_program(), **kwargs)</a></li>
<li><a href="#_1">注意事项</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslimdist-api">paddleslim.dist API文档</h1>
<h2 id="mergeteacher_program-student_program-data_name_map-place-scopefluidglobal_scope-name_prefixteacher_">merge(teacher_program, student_program, data_name_map, place, scope=fluid.global_scope(), name_prefix='teacher_')</h2>
<p>该方法将两个fluid program(teacher_program, student_program)融合为一个program,并将融合得到的program返回。在融合的program中,可以为其中合适的teacher特征图和student特征图添加蒸馏损失函数,从而达到用teacher模型的暗知识(Dark Knowledge)指导student模型学习的目的。</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>teacher_program</strong>(Program)-定义了teacher模型的paddle program</li>
<li><strong>student_program</strong>(Program)-定义了student模型的paddle program</li>
<li><strong>data_name_map</strong>(dict)-teacher输入接口名与student输入接口名的映射,key为teacher的输入名,value为student的输入名。merge函数将会把这两个模型的输入按对应关系合并在一起,保证teacher与student输入数据相同</li>
<li><strong>place</strong>(fluid.CPUPlace()|fluid.CUDAPlace(N))-该参数表示程序运行在何种设备上,这里的N为GPU对应的ID</li>
<li><strong>scope</strong>(Scope)-该参数表示teacher variables和student variables所使用的作用域,如果不指定将使用默认的全局作用域。默认值:fluid.global_scope()</li>
<li><strong>name_prefix</strong>(str)-为了避免teacher variables和student variables存在同名变量而引起命名冲突,merge函数将统一为teacher variables添加一个名称前缀name_prefix,merge后的program中所有teacher variables都将带有这一名称前缀。默认值:'teacher_'</li>
</ul>
<p><strong>返回:</strong>由student_program和teacher_program merge得到的program</p>
<p><strong>使用示例:</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.dist as dist
student_program = fluid.Program()
with fluid.program_guard(student_program):
x = fluid.layers.data(name='x', shape=[1, 28, 28])
conv = fluid.layers.conv2d(x, 32, 1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1)
teacher_program = fluid.Program()
with fluid.program_guard(teacher_program):
y = fluid.layers.data(name='y', shape=[1, 28, 28])
conv = fluid.layers.conv2d(y, 32, 1)
conv = fluid.layers.conv2d(conv, 32, 3, padding=1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1)
data_name_map = {'y':'x'}
USE_GPU = False
place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace()
main_program = dist.merge(teacher_program, student_program, data_name_map, place)
</code></pre>
<h2 id="fsp_lossteacher_var1_name-teacher_var2_name-student_var1_name-student_var2_name-programfluiddefault_main_program">fsp_loss(teacher_var1_name, teacher_var2_name, student_var1_name, student_var2_name, program=fluid.default_main_program())</h2>
<p>fsp_loss为program内的teacher var和student var添加fsp loss,出自论文<a href="http://openaccess.thecvf.com/content_cvpr_2017/papers/Yim_A_Gift_From_CVPR_2017_paper.pdf">A Gift from Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning</a></p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>teacher_var1_name</strong>(str): teacher_var1的名称. 对应的variable是一个形为<code>[batch_size, x_channel, height, width]</code>的4-D特征图Tensor,数据类型为float32或float64</li>
<li><strong>teacher_var2_name</strong>(str): teacher_var2的名称. 对应的variable是一个形为<code>[batch_size, y_channel, height, width]</code>的4-D特征图Tensor,数据类型为float32或float64。只有y_channel可以与teacher_var1的x_channel不同,其他维度必须与teacher_var1相同</li>
<li><strong>student_var1_name</strong>(str): student_var1的名称. 对应的variable需与teacher_var1尺寸保持一致,是一个形为<code>[batch_size, x_channel, height, width]</code>的4-D特征图Tensor,数据类型为float32或float64</li>
<li><strong>student_var2_name</strong>(str): student_var2的名称. 对应的variable需与teacher_var2尺寸保持一致,是一个形为<code>[batch_size, y_channel, height, width]</code>的4-D特征图Tensor,数据类型为float32或float64。只有y_channel可以与student_var1的x_channel不同,其他维度必须与student_var1相同</li>
<li><strong>program</strong>(Program): 用于蒸馏训练的fluid program。默认值:fluid.default_main_program()</li>
</ul>
<p><strong>返回:</strong>由teacher_var1, teacher_var2, student_var1, student_var2组合得到的fsp_loss</p>
<p><strong>使用示例:</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.dist as dist
student_program = fluid.Program()
with fluid.program_guard(student_program):
x = fluid.layers.data(name='x', shape=[1, 28, 28])
conv = fluid.layers.conv2d(x, 32, 1, name='s1')
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2')
teacher_program = fluid.Program()
with fluid.program_guard(teacher_program):
y = fluid.layers.data(name='y', shape=[1, 28, 28])
conv = fluid.layers.conv2d(y, 32, 1, name='t1')
conv = fluid.layers.conv2d(conv, 32, 3, padding=1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2')
data_name_map = {'y':'x'}
USE_GPU = False
place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace()
main_program = merge(teacher_program, student_program, data_name_map, place)
with fluid.program_guard(main_program):
distillation_loss = dist.fsp_loss('teacher_t1.tmp_1', 'teacher_t2.tmp_1', 's1.tmp_1', 's2.tmp_1', main_program)
</code></pre>
<h2 id="l2_lossteacher_var_name-student_var_name-programfluiddefault_main_program">l2_loss(teacher_var_name, student_var_name, program=fluid.default_main_program())</h2>
<p>l2_loss为program内的teacher var和student var添加l2 loss</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>teacher_var_name</strong>(str): teacher_var的名称. </li>
<li><strong>student_var_name</strong>(str): student_var的名称.</li>
<li><strong>program</strong>(Program): 用于蒸馏训练的fluid program。默认值:fluid.default_main_program()</li>
</ul>
<p><strong>返回:</strong>由teacher_var, student_var组合得到的l2_loss</p>
<p><strong>使用示例:</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.dist as dist
student_program = fluid.Program()
with fluid.program_guard(student_program):
x = fluid.layers.data(name='x', shape=[1, 28, 28])
conv = fluid.layers.conv2d(x, 32, 1, name='s1')
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2')
teacher_program = fluid.Program()
with fluid.program_guard(teacher_program):
y = fluid.layers.data(name='y', shape=[1, 28, 28])
conv = fluid.layers.conv2d(y, 32, 1, name='t1')
conv = fluid.layers.conv2d(conv, 32, 3, padding=1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2')
data_name_map = {'y':'x'}
USE_GPU = False
place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace()
main_program = merge(teacher_program, student_program, data_name_map, place)
with fluid.program_guard(main_program):
distillation_loss = dist.l2_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program)
</code></pre>
<h2 id="soft_label_lossteacher_var_name-student_var_name-programfluiddefault_main_program-teacher_temperature1-student_temperature1">soft_label_loss(teacher_var_name, student_var_name, program=fluid.default_main_program(), teacher_temperature=1., student_temperature=1.)</h2>
<p>soft_label_loss为program内的teacher var和student var添加soft label loss,出自论文<a href="https://arxiv.org/pdf/1503.02531.pdf">Distilling the Knowledge in a Neural Network</a></p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>teacher_var_name</strong>(str): teacher_var的名称. </li>
<li><strong>student_var_name</strong>(str): student_var的名称. </li>
<li><strong>program</strong>(Program): 用于蒸馏训练的fluid program。默认值:fluid.default_main_program()</li>
<li><strong>teacher_temperature</strong>(float): 对teacher_var进行soft操作的温度值,温度值越大得到的特征图越平滑 </li>
<li><strong>student_temperature</strong>(float): 对student_var进行soft操作的温度值,温度值越大得到的特征图越平滑 </li>
</ul>
<p><strong>返回:</strong>由teacher_var, student_var组合得到的soft_label_loss</p>
<p><strong>使用示例:</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.dist as dist
student_program = fluid.Program()
with fluid.program_guard(student_program):
x = fluid.layers.data(name='x', shape=[1, 28, 28])
conv = fluid.layers.conv2d(x, 32, 1, name='s1')
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2')
teacher_program = fluid.Program()
with fluid.program_guard(teacher_program):
y = fluid.layers.data(name='y', shape=[1, 28, 28])
conv = fluid.layers.conv2d(y, 32, 1, name='t1')
conv = fluid.layers.conv2d(conv, 32, 3, padding=1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2')
data_name_map = {'y':'x'}
USE_GPU = False
place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace()
main_program = merge(teacher_program, student_program, data_name_map, place)
with fluid.program_guard(main_program):
distillation_loss = dist.soft_label_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program, 1., 1.)
</code></pre>
<h2 id="lossloss_func-programfluiddefault_main_program-kwargs">loss(loss_func, program=fluid.default_main_program(), **kwargs)</h2>
<p>loss函数支持对任意多对teacher_var和student_var使用自定义损失函数</p>
<p><strong>参数:</strong></p>
<ul>
<li><strong>loss_func</strong>(python function): 自定义的损失函数,输入为teacher var和student var,输出为自定义的loss </li>
<li><strong>program</strong>(Program): 用于蒸馏训练的fluid program。默认值:fluid.default_main_program()</li>
<li><strong>**kwargs</strong>: loss_func输入名与对应variable名称</li>
</ul>
<p><strong>返回</strong>:自定义的损失函数loss</p>
<p><strong>使用示例:</strong></p>
<pre><code class="python">import paddle.fluid as fluid
import paddleslim.dist as dist
student_program = fluid.Program()
with fluid.program_guard(student_program):
x = fluid.layers.data(name='x', shape=[1, 28, 28])
conv = fluid.layers.conv2d(x, 32, 1, name='s1')
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2')
teacher_program = fluid.Program()
with fluid.program_guard(teacher_program):
y = fluid.layers.data(name='y', shape=[1, 28, 28])
conv = fluid.layers.conv2d(y, 32, 1, name='t1')
conv = fluid.layers.conv2d(conv, 32, 3, padding=1)
out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2')
data_name_map = {'y':'x'}
USE_GPU = False
place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace()
main_program = merge(teacher_program, student_program, data_name_map, place)
def adaptation_loss(t_var, s_var):
teacher_channel = t_var.shape[1]
s_hint = fluid.layers.conv2d(s_var, teacher_channel, 1)
hint_loss = fluid.layers.reduce_mean(fluid.layers.square(s_hint - t_var))
return hint_loss
with fluid.program_guard(main_program):
distillation_loss = dist.loss(main_program, adaptation_loss, t_var='teacher_t2.tmp_1', s_var='s2.tmp_1')
</code></pre>
<h2 id="_1">注意事项</h2>
<p>在添加蒸馏loss时会引入新的variable,需要注意新引入的variable不要与student variables命名冲突。这里建议两种用法:</p>
<ol>
<li>建议与student_program使用同一个命名空间,以避免一些未指定名称的variables(例如tmp_0, tmp_1...)多次定义为同一名称出现命名冲突</li>
<li>建议在添加蒸馏loss时指定一个命名空间前缀,具体用法请参考Paddle官方文档<a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/fluid_cn/name_scope_cn.html#name-scope">fluid.name_scope</a></li>
</ol></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>PaddleSlim - My Docs</title>
<link href="../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../js/jquery-1.10.2.min.js" defer></script>
<script src="../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="active">
<a href="./">PaddleSlim</a>
</li>
<li >
<a href="table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="..">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="table_latency/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#paddleslim">PaddleSlim</a></li>
<li><a href="#_1">功能</a></li>
<li><a href="#_2">安装</a></li>
<li><a href="#_3">使用</a></li>
<li><a href="#_4">贡献与反馈</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="paddleslim">PaddleSlim</h1>
<p>PaddleSlim是PaddlePaddle框架的一个子模块,主要用于压缩图像领域模型。在PaddleSlim中,不仅实现了目前主流的网络剪枝、量化、蒸馏三种压缩策略,还实现了超参数搜索和小模型网络结构搜索功能。在后续版本中,会添加更多的压缩策略,以及完善对NLP领域模型的支持。</p>
<h2 id="_1">功能</h2>
<ul>
<li>模型剪裁</li>
<li>支持通道均匀模型剪裁(uniform pruning)</li>
<li>基于敏感度的模型剪裁</li>
<li>
<p>基于进化算法的自动模型剪裁三种方式</p>
</li>
<li>
<p>量化训练</p>
</li>
<li>在线量化训练(training aware)</li>
<li>离线量化(post training)</li>
<li>
<p>支持对权重全局量化和Channel-Wise量化</p>
</li>
<li>
<p>蒸馏</p>
</li>
<li>
<p>轻量神经网络结构自动搜索(Light-NAS)</p>
</li>
<li>支持基于进化算法的轻量神经网络结构自动搜索(Light-NAS)</li>
<li>支持 FLOPS / 硬件延时约束</li>
<li>支持多平台模型延时评估</li>
</ul>
<h2 id="_2">安装</h2>
<p>安装PaddleSlim前,请确认已正确安装Paddle1.6版本或更新版本。Paddle安装请参考:<a href="https://www.paddlepaddle.org.cn/install/quick">Paddle安装教程</a></p>
<ul>
<li>安装develop版本</li>
</ul>
<pre><code>git clone https://github.com/PaddlePaddle/PaddleSlim.git
cd PaddleSlim
python setup.py install
</code></pre>
<ul>
<li>安装官方发布的最新版本</li>
</ul>
<pre><code>pip install paddleslim -i https://pypi.org/simple
</code></pre>
<ul>
<li>安装历史版本</li>
</ul>
<p>请点击<a href="https://pypi.org/project/paddleslim/#history">pypi.org</a>查看可安装历史版本。</p>
<h2 id="_3">使用</h2>
<ul>
<li><a href="doc/api_guide.md">API文档</a>:API使用介绍,包括<a href="">蒸馏</a><a href="">剪裁</a><a href="">量化</a><a href="">模型结构搜索</a></li>
<li><a href="doc/demo_guide.md">示例</a>:基于mnist和cifar10等简单分类任务的模型压缩示例,您可以通过该部分快速体验和了解PaddleSlim的功能。</li>
<li><a href="">实践教程</a>:经典模型的分析和压缩实验教程。</li>
<li><a href="">模型库</a>:经过压缩的分类、检测、语义分割模型,包括权重文件、网络结构文件和性能数据。</li>
<li><a href="">Paddle检测库</a>:介绍如何在检测库中使用PaddleSlim。</li>
<li><a href="">Paddle分割库</a>:介绍如何在分割库中使用PaddleSlim。</li>
<li><a href="">PaddleLite</a>:介绍如何使用预测库PaddleLite部署PaddleSlim产出的模型。</li>
</ul>
<h2 id="_4">贡献与反馈</h2></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js" defer></script>
<script src="../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>硬件延时评估表 - My Docs</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../">PaddleSlim</a>
</li>
<li class="active">
<a href="./">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="../tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../api/analysis_api/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#_1">硬件延时评估表</a></li>
<li><a href="#_2">概述</a></li>
<li><a href="#_3">整体格式</a></li>
<li><a href="#_4">版本信息</a></li>
<li><a href="#_5">操作信息</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="_1">硬件延时评估表</h1>
<p>硬件延时评估表用于快速评估一个模型在特定硬件环境和推理引擎上的推理速度。
该文档主要用于定义PaddleSlim支持的硬件延时评估表的格式。</p>
<h2 id="_2">概述</h2>
<p>硬件延时评估表中存放着所有可能的操作对应的延时信息,该表中的一个操作包括操作类型和操作参数,比如:操作类型可以是<code>conv2d</code>,对应的操作参数有输入特征图的大小、卷积核个数、卷积核大小等。
给定操作的延时依赖于硬件环境和推理引擎。</p>
<h2 id="_3">整体格式</h2>
<p>硬件延时评估表以文件或多行字符串的形式保存。</p>
<p>硬件延时评估表第一行保存版本信息,后续每行为一个操作和对应的延时信息。</p>
<h2 id="_4">版本信息</h2>
<p>版本信息以英文字符逗号分割,内容依次为硬件环境名称、推理引擎名称和时间戳。</p>
<ul>
<li>
<p><strong>硬件环境名称:</strong> 用于标识硬件环境,可以包含计算架构类型、版本号等信息。</p>
</li>
<li>
<p><strong>推理引擎名称:</strong> 用于标识推理引擎,可以包含推理引擎名称、版本号、优化选项等信息。</p>
</li>
<li>
<p><strong>时间戳:</strong> 该评估表的创建时间。</p>
</li>
</ul>
<h2 id="_5">操作信息</h2>
<p>操作信息字段之间以逗号分割。操作信息与延迟信息之间以制表符分割。</p>
<h3 id="conv2d">conv2d</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,flag_bias,flag_relu,n_in,c_in,h_in,w_in,c_out,groups,kernel,padding,stride,dilation\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>flag_bias (int)</strong> - 是否有 bias(0:无,1:有)。</li>
<li><strong>flag_relu (int)</strong> - 是否有 relu(0:无,1:有)。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>c_out (int)</strong> - 输出 Tensor 的通道 (channel) 数。</li>
<li><strong>groups (int)</strong> - 卷积二维层(Conv2D Layer)的组数。</li>
<li><strong>kernel (int)</strong> - 卷积核大小。</li>
<li><strong>padding (int)</strong> - 填充 (padding) 大小。</li>
<li><strong>stride (int)</strong> - 步长 (stride) 大小。</li>
<li><strong>dilation (int)</strong> - 膨胀 (dilation) 大小。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul>
<h3 id="activation">activation</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,n_in,c_in,h_in,w_in\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul>
<h3 id="batch_norm">batch_norm</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,active_type,n_in,c_in,h_in,w_in\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>active_type (string)</strong> - 激活函数类型,包含:relu, prelu, sigmoid, relu6, tanh。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul>
<h3 id="eltwise">eltwise</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,n_in,c_in,h_in,w_in\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul>
<h3 id="pooling">pooling</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,flag_global_pooling,n_in,c_in,h_in,w_in,kernel,padding,stride,ceil_mode,pool_type\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>flag_global_pooling (int)</strong> - 是否为全局池化(0:不是,1:是)。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>kernel (int)</strong> - 卷积核大小。</li>
<li><strong>padding (int)</strong> - 填充 (padding) 大小。</li>
<li><strong>stride (int)</strong> - 步长 (stride) 大小。</li>
<li><strong>ceil_mode (int)</strong> - 是否用 ceil 函数计算输出高度和宽度。0 表示使用 floor 函数,1 表示使用 ceil 函数。</li>
<li><strong>pool_type (int)</strong> - 池化类型,其中 1 表示 pooling_max,2 表示 pooling_average_include_padding,3 表示 pooling_average_exclude_padding。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul>
<h3 id="softmax">softmax</h3>
<p><strong>格式</strong></p>
<pre><code>op_type,axis,n_in,c_in,h_in,w_in\tlatency
</code></pre>
<p><strong>字段解释</strong></p>
<ul>
<li><strong>op_type(str)</strong> - 当前op类型。</li>
<li><strong>axis (int)</strong> - 执行 softmax 计算的维度索引,应该在 [−1,rank − 1] 范围内,其中 rank 是输入变量的秩。</li>
<li><strong>n_in (int)</strong> - 输入 Tensor 的批尺寸 (batch size)。</li>
<li><strong>c_in (int)</strong> - 输入 Tensor 的通道 (channel) 数。</li>
<li><strong>h_in (int)</strong> - 输入 Tensor 的特征高度。</li>
<li><strong>w_in (int)</strong> - 输入 Tensor 的特征宽度。</li>
<li><strong>latency (float)</strong> - 当前op的延时时间</li>
</ul></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>Demo guide - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li class="active">
<a href="./">Demo guide</a>
</li>
<li >
<a href="../nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../../api/single_distiller_api/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../nas_demo/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#_1">蒸馏</a></li>
<li class="main "><a href="#_2">量化</a></li>
<li><a href="#demo">量化训练demo文档</a></li>
<li><a href="#demo_1">离线量化demo文档</a></li>
<li><a href="#embeddingdemo">Embedding量化demo文档</a></li>
<li class="main "><a href="#nas">NAS</a></li>
<li><a href="#nas_1">NAS示例</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h2 id="_1"><a href="../demo/distillation/distillation_demo.py">蒸馏</a></h2>
<p>蒸馏demo默认使用ResNet50作为teacher网络,MobileNet作为student网络,此外还支持将teacher和student换成<a href="../demo/models">models目录</a>支持的任意模型。</p>
<p>demo中对teahcer模型和student模型的一层特征图添加了l2_loss的蒸馏损失函数,使用时也可根据需要选择fsp_loss, soft_label_loss以及自定义的loss函数。</p>
<p>训练默认使用的是cifar10数据集,piecewise_decay学习率衰减策略,momentum优化器进行120轮蒸馏训练。使用者也可以简单地用args参数切换为使用ImageNet数据集,cosine_decay学习率衰减策略等其他训练配置。</p>
<h2 id="_2">量化</h2>
<h3 id="demo"><a href="../quant_aware_demo/">量化训练demo文档</a></h3>
<h3 id="demo_1"><a href="../quant_post_demo/">离线量化demo文档</a></h3>
<h3 id="embeddingdemo"><a href="../quant_embedding_demo/">Embedding量化demo文档</a></h3>
<h2 id="nas">NAS</h2>
<h3 id="nas_1"><a href="../nas_demo/">NAS示例</a></h3></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>网络结构搜索示例 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../demo_guide/">Demo guide</a>
</li>
<li class="active">
<a href="./">网络结构搜索示例</a>
</li>
<li >
<a href="../quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../demo_guide/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../quant_aware_demo/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#_1">网络结构搜索示例</a></li>
<li><a href="#_2">接口介绍</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="_1">网络结构搜索示例</h1>
<p>本示例介绍如何使用网络结构搜索接口,搜索到一个更小或者精度更高的模型,该文档仅介绍paddleslim中SANAS的使用及如何利用SANAS得到模型结构,完整示例代码请参考sa_nas_mobilenetv2.py或者block_sa_nas_mobilenetv2.py。</p>
<h2 id="_2">接口介绍</h2>
<p>请参考。</p>
<h3 id="1">1. 配置搜索空间</h3>
<p>详细的搜索空间配置可以参考<a href='../../../paddleslim/nas/nas_api.md'>神经网络搜索API文档</a></p>
<pre><code>config = [('MobileNetV2Space')]
</code></pre>
<h3 id="2-sanas">2. 利用搜索空间初始化SANAS实例</h3>
<pre><code>from paddleslim.nas import SANAS
sa_nas = SANAS(
config,
server_addr=(&quot;&quot;, 8881),
init_temperature=10.24,
reduce_rate=0.85,
search_steps=300,
is_server=True)
</code></pre>
<h3 id="3-nas">3. 根据实例化的NAS得到当前的网络结构</h3>
<pre><code>archs = sa_nas.next_archs()
</code></pre>
<h3 id="4-program">4. 根据得到的网络结构和输入构造训练和测试program</h3>
<pre><code>import paddle.fluid as fluid
train_program = fluid.Program()
test_program = fluid.Program()
startup_program = fluid.Program()
with fluid.program_guard(train_program, startup_program):
data = fluid.data(name='data', shape=[None, 3, 32, 32], dtype='float32')
label = fluid.data(name='label', shape=[None, 1], dtype='int64')
for arch in archs:
data = arch(data)
output = fluid.layers.fc(data, 10)
softmax_out = fluid.layers.softmax(input=output, use_cudnn=False)
cost = fluid.layers.cross_entropy(input=softmax_out, label=label)
avg_cost = fluid.layers.mean(cost)
acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1)
test_program = train_program.clone(for_test=True)
sgd = fluid.optimizer.SGD(learning_rate=1e-3)
sgd.minimize(avg_cost)
</code></pre>
<h3 id="5-program">5. 根据构造的训练program添加限制条件</h3>
<pre><code>from paddleslim.analysis import flops
if flops(train_program) &gt; 321208544:
continue
</code></pre>
<h3 id="6-score">6. 回传score</h3>
<pre><code>sa_nas.reward(score)
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>在线量化示例 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../demo_guide/">Demo guide</a>
</li>
<li >
<a href="../nas_demo/">网络结构搜索示例</a>
</li>
<li class="active">
<a href="./">在线量化示例</a>
</li>
<li >
<a href="../quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="../quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../nas_demo/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../quant_embedding_demo/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#_1">在线量化示例</a></li>
<li><a href="#_2">接口介绍</a></li>
<li><a href="#_3">分类模型的离线量化流程</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="_1">在线量化示例</h1>
<p>本示例介绍如何使用在线量化接口,来对训练好的分类模型进行量化, 可以减少模型的存储空间和显存占用。</p>
<h2 id="_2">接口介绍</h2>
<p>请参考 <a href='../../../paddleslim/quant/quantization_api_doc.md'>量化API文档</a></p>
<h2 id="_3">分类模型的离线量化流程</h2>
<h3 id="1">1. 配置量化参数</h3>
<pre><code>quant_config = {
'weight_quantize_type': 'abs_max',
'activation_quantize_type': 'moving_average_abs_max',
'weight_bits': 8,
'activation_bits': 8,
'not_quant_pattern': ['skip_quant'],
'quantize_op_types': ['conv2d', 'depthwise_conv2d', 'mul'],
'dtype': 'int8',
'window_size': 10000,
'moving_rate': 0.9,
'quant_weight_only': False
}
</code></pre>
<h3 id="2-programop">2. 对训练和测试program插入可训练量化op</h3>
<pre><code>val_program = quant_aware(val_program, place, quant_config, scope=None, for_test=True)
compiled_train_prog = quant_aware(train_prog, place, quant_config, scope=None, for_test=False)
</code></pre>
<h3 id="3build">3.关掉指定build策略</h3>
<pre><code>build_strategy = fluid.BuildStrategy()
build_strategy.fuse_all_reduce_ops = False
build_strategy.sync_batch_norm = False
exec_strategy = fluid.ExecutionStrategy()
compiled_train_prog = compiled_train_prog.with_data_parallel(
loss_name=avg_cost.name,
build_strategy=build_strategy,
exec_strategy=exec_strategy)
</code></pre>
<h3 id="4-freeze-program">4. freeze program</h3>
<pre><code>float_program, int8_program = convert(val_program,
place,
quant_config,
scope=None,
save_int8=True)
</code></pre>
<h3 id="5">5.保存预测模型</h3>
<pre><code>fluid.io.save_inference_model(
dirname=float_path,
feeded_var_names=[image.name],
target_vars=[out], executor=exe,
main_program=float_program,
model_filename=float_path + '/model',
params_filename=float_path + '/params')
fluid.io.save_inference_model(
dirname=int8_path,
feeded_var_names=[image.name],
target_vars=[out], executor=exe,
main_program=int8_program,
model_filename=int8_path + '/model',
params_filename=int8_path + '/params')
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>Embedding量化示例 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../demo_guide/">Demo guide</a>
</li>
<li >
<a href="../nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../quant_aware_demo/">在线量化示例</a>
</li>
<li class="active">
<a href="./">Embedding量化示例</a>
</li>
<li >
<a href="../quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../quant_aware_demo/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../quant_post_demo/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#embedding">Embedding量化示例</a></li>
<li><a href="#skip-gramword2vector">基于skip-gram的word2vector模型</a></li>
<li><a href="#skip-gramword2vector_1">量化基于skip-gram的word2vector模型</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="embedding">Embedding量化示例</h1>
<p>本示例介绍如何使用Embedding量化的接口 <a href="">paddleslim.quant.quant_embedding</a><code>quant_embedding</code>接口将网络中的Embedding参数从<code>float32</code>类型量化到 <code>8-bit</code>整数类型,在几乎不损失模型精度的情况下减少模型的存储空间和显存占用。</p>
<p>接口介绍请参考 <a href='../../../paddleslim/quant/quantization_api_doc.md'>量化API文档</a></p>
<p>该接口对program的修改:</p>
<p>量化前:</p>
<p align="center">
<img src="./image/before.png" height=200 width=100 hspace='10'/> <br />
<strong>图1:量化前的模型结构</strong>
</p>
<p>量化后:</p>
<p align="center">
<img src="./image/after.png" height=300 width=300 hspace='10'/> <br />
<strong>图2: 量化后的模型结构</strong>
</p>
<p>以下将以 <code>基于skip-gram的word2vector模型</code> 为例来说明如何使用<code>quant_embedding</code>接口。首先介绍 <code>基于skip-gram的word2vector模型</code> 的正常训练和测试流程。</p>
<h2 id="skip-gramword2vector">基于skip-gram的word2vector模型</h2>
<p>以下是本例的简要目录结构及说明:</p>
<pre><code class="text">.
├── cluster_train.py # 分布式训练函数
├── cluster_train.sh # 本地模拟多机脚本
├── train.py # 训练函数
├── infer.py # 预测脚本
├── net.py # 网络结构
├── preprocess.py # 预处理脚本,包括构建词典和预处理文本
├── reader.py # 训练阶段的文本读写
├── train.py # 训练函数
└── utils.py # 通用函数
</code></pre>
<h3 id="_1">介绍</h3>
<p>本例实现了skip-gram模式的word2vector模型。</p>
<p>同时推荐用户参考<a href="https://aistudio.baidu.com/aistudio/projectDetail/124377"> IPython Notebook demo</a></p>
<h3 id="_2">数据下载</h3>
<p>全量数据集使用的是来自1 Billion Word Language Model Benchmark的(http://www.statmt.org/lm-benchmark) 的数据集.</p>
<pre><code class="bash">mkdir data
wget http://www.statmt.org/lm-benchmark/1-billion-word-language-modeling-benchmark-r13output.tar.gz
tar xzvf 1-billion-word-language-modeling-benchmark-r13output.tar.gz
mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/
</code></pre>
<p>备用数据地址下载命令如下</p>
<pre><code class="bash">mkdir data
wget https://paddlerec.bj.bcebos.com/word2vec/1-billion-word-language-modeling-benchmark-r13output.tar
tar xvf 1-billion-word-language-modeling-benchmark-r13output.tar
mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/
</code></pre>
<p>为了方便快速验证,我们也提供了经典的text8样例数据集,包含1700w个词。 下载命令如下</p>
<pre><code class="bash">mkdir data
wget https://paddlerec.bj.bcebos.com/word2vec/text.tar
tar xvf text.tar
mv text data/
</code></pre>
<h3 id="_3">数据预处理</h3>
<p>以样例数据集为例进行预处理。全量数据集注意解压后以training-monolingual.tokenized.shuffled 目录为预处理目录,和样例数据集的text目录并列。</p>
<p>词典格式: 词&lt;空格&gt;词频。注意低频词用'UNK'表示</p>
<p>可以按格式自建词典,如果自建词典跳过第一步。</p>
<pre><code>the 1061396
of 593677
and 416629
one 411764
in 372201
a 325873
&lt;UNK&gt; 324608
to 316376
zero 264975
nine 250430
</code></pre>
<p>第一步根据英文语料生成词典,中文语料可以通过修改text_strip方法自定义处理方法。</p>
<pre><code class="bash">python preprocess.py --build_dict --build_dict_corpus_dir data/text/ --dict_path data/test_build_dict
</code></pre>
<p>第二步根据词典将文本转成id, 同时进行downsample,按照概率过滤常见词, 同时生成word和id映射的文件,文件名为词典+"<em>word_to_id</em>"。</p>
<pre><code class="bash">python preprocess.py --filter_corpus --dict_path data/test_build_dict --input_corpus_dir data/text --output_corpus_dir data/convert_text8 --min_count 5 --downsample 0.001
</code></pre>
<h3 id="_4">训练</h3>
<p>具体的参数配置可运行</p>
<pre><code class="bash">python train.py -h
</code></pre>
<p>单机多线程训练</p>
<pre><code class="bash">OPENBLAS_NUM_THREADS=1 CPU_NUM=5 python train.py --train_data_dir data/convert_text8 --dict_path data/test_build_dict --num_passes 10 --batch_size 100 --model_output_dir v1_cpu5_b100_lr1dir --base_lr 1.0 --print_batch 1000 --with_speed --is_sparse
</code></pre>
<p>本地单机模拟多机训练</p>
<pre><code class="bash">sh cluster_train.sh
</code></pre>
<p>本示例中按照单机多线程训练的命令进行训练,训练完毕后,可看到在当前文件夹下保存模型的路径为: <code>v1_cpu5_b100_lr1dir</code>, 运行 <code>ls v1_cpu5_b100_lr1dir</code>可看到该文件夹下保存了训练的10个epoch的模型文件。</p>
<pre><code>pass-0 pass-1 pass-2 pass-3 pass-4 pass-5 pass-6 pass-7 pass-8 pass-9
</code></pre>
<h3 id="_5">预测</h3>
<p>测试集下载命令如下</p>
<pre><code class="bash">#全量数据集测试集
wget https://paddlerec.bj.bcebos.com/word2vec/test_dir.tar
#样本数据集测试集
wget https://paddlerec.bj.bcebos.com/word2vec/test_mid_dir.tar
</code></pre>
<p>预测命令,注意词典名称需要加后缀"<em>word_to_id</em>", 此文件是预处理阶段生成的。</p>
<pre><code class="bash">python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9
</code></pre>
<p>运行该预测命令, 可看到如下输出</p>
<pre><code>('start index: ', 0, ' last_index:', 9)
('vocab_size:', 63642)
step:1 249
epoch:0 acc:0.014
step:1 590
epoch:1 acc:0.033
step:1 982
epoch:2 acc:0.055
step:1 1338
epoch:3 acc:0.075
step:1 1653
epoch:4 acc:0.093
step:1 1914
epoch:5 acc:0.107
step:1 2204
epoch:6 acc:0.124
step:1 2416
epoch:7 acc:0.136
step:1 2606
epoch:8 acc:0.146
step:1 2722
epoch:9 acc:0.153
</code></pre>
<h2 id="skip-gramword2vector_1">量化<code>基于skip-gram的word2vector模型</code></h2>
<p>量化配置为:</p>
<pre><code>config = {
'params_name': 'emb',
'quantize_type': 'abs_max'
}
</code></pre>
<p>运行命令为:</p>
<pre><code class="bash">python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9 --emb_quant True
</code></pre>
<p>运行输出为:</p>
<pre><code>('start index: ', 0, ' last_index:', 9)
('vocab_size:', 63642)
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 253
epoch:0 acc:0.014
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 586
epoch:1 acc:0.033
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 970
epoch:2 acc:0.054
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 1364
epoch:3 acc:0.077
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 1642
epoch:4 acc:0.092
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 1936
epoch:5 acc:0.109
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 2216
epoch:6 acc:0.124
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 2419
epoch:7 acc:0.136
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 2603
epoch:8 acc:0.146
quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'}
step:1 2719
epoch:9 acc:0.153
</code></pre>
<p>量化后的模型保存在<code>./output_quant</code>中,可看到量化后的参数<code>'emb.int8'</code>的大小为3.9M, 在<code>./v1_cpu5_b100_lr1dir</code>中可看到量化前的参数<code>'emb'</code>的大小为16M。</p></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>离线量化示例 - My Docs</title>
<link href="../../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../../js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../..">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../../..">Welcome to MkDocs</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../">PaddleSlim</a>
</li>
<li >
<a href="../../table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="../../api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="../../api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="../../api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="../../api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="../../api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="../../api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="../../api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="../demo_guide/">Demo guide</a>
</li>
<li >
<a href="../nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="../quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="../quant_embedding_demo/">Embedding量化示例</a>
</li>
<li class="active">
<a href="./">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li >
<a rel="next" href="../quant_embedding_demo/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="disabled">
<a rel="prev" >
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#_1">离线量化示例</a></li>
<li><a href="#_2">接口介绍</a></li>
<li><a href="#_3">分类模型的离线量化流程</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="_1">离线量化示例</h1>
<p>本示例介绍如何使用离线量化接口<code>paddleslim.quant.quant_post</code>来对训练好的分类模型进行离线量化, 该接口无需对模型进行训练就可得到量化模型,减少模型的存储空间和显存占用。</p>
<h2 id="_2">接口介绍</h2>
<p>请参考 <a href='../../../paddleslim/quant/quantization_api_doc.md'>量化API文档</a></p>
<h2 id="_3">分类模型的离线量化流程</h2>
<h3 id="_4">准备数据</h3>
<p>在当前文件夹下创建<code>data</code>文件夹,将<code>imagenet</code>数据集解压在<code>data</code>文件夹下,解压后<code>data</code>文件夹下应包含以下文件:
- <code>'train'</code>文件夹,训练图片
- <code>'train_list.txt'</code>文件
- <code>'val'</code>文件夹,验证图片
- <code>'val_list.txt'</code>文件</p>
<h3 id="_5">准备需要量化的模型</h3>
<p>因为离线量化接口只支持加载通过<code>fluid.io.save_inference_model</code>接口保存的模型,因此如果您的模型是通过其他接口保存的,那需要先将模型进行转化。本示例将以分类模型为例进行说明。</p>
<p>首先在<a href="https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/image_classification#%E5%B7%B2%E5%8F%91%E5%B8%83%E6%A8%A1%E5%9E%8B%E5%8F%8A%E5%85%B6%E6%80%A7%E8%83%BD">imagenet分类模型</a>中下载训练好的<code>mobilenetv1</code>模型。</p>
<p>在当前文件夹下创建<code>'pretrain'</code>文件夹,将<code>mobilenetv1</code>模型在该文件夹下解压,解压后的目录为<code>pretrain/MobileNetV1_pretrained</code></p>
<h3 id="_6">导出模型</h3>
<p>通过运行以下命令可将模型转化为离线量化接口可用的模型:</p>
<pre><code>python export_model.py --model &quot;MobileNet&quot; --pretrained_model ./pretrain/MobileNetV1_pretrained --data imagenet
</code></pre>
<p>转化之后的模型存储在<code>inference_model/MobileNet/</code>文件夹下,可看到该文件夹下有<code>'model'</code>, <code>'weights'</code>两个文件。</p>
<h3 id="_7">离线量化</h3>
<p>接下来对导出的模型文件进行离线量化,离线量化的脚本为<a href="./quant_post.py">quant_post.py</a>,脚本中使用接口<code>paddleslim.quant.quant_post</code>对模型进行离线量化。运行命令为:</p>
<pre><code>python quant_post.py --model_path ./inference_model/MobileNet --save_path ./quant_model_train/MobileNet --model_filename model --params_filename weights
</code></pre>
<ul>
<li><code>model_path</code>: 需要量化的模型坐在的文件夹</li>
<li><code>save_path</code>: 量化后的模型保存的路径</li>
<li><code>model_filename</code>: 如果需要量化的模型的参数文件保存在一个文件中,则设置为该模型的模型文件名称,如果参数文件保存在多个文件中,则不需要设置。</li>
<li><code>params_filename</code>: 如果需要量化的模型的参数文件保存在一个文件中,则设置为该模型的参数文件名称,如果参数文件保存在多个文件中,则不需要设置。</li>
</ul>
<p>运行以上命令后,可在<code>${save_path}</code>下看到量化后的模型文件和参数文件。</p>
<blockquote>
<p>使用的量化算法为<code>'KL'</code>, 使用训练集中的160张图片进行量化参数的校正。</p>
</blockquote>
<h3 id="_8">测试精度</h3>
<p>使用<a href="./eval.py">eval.py</a>脚本对量化前后的模型进行测试,得到模型的分类精度进行对比。</p>
<p>首先测试量化前的模型的精度,运行以下命令:</p>
<pre><code>python eval.py --model_path ./inference_model/MobileNet --model_name model --params_name weights
</code></pre>
<p>精度输出为:</p>
<pre><code>top1_acc/top5_acc= [0.70913923 0.89548034]
</code></pre>
<p>使用以下命令测试离线量化后的模型的精度:</p>
<pre><code>python eval.py --model_path ./quant_model_train/MobileNet
</code></pre>
<p>精度输出为</p>
<pre><code>top1_acc/top5_acc= [0.70141864 0.89086477]
</code></pre>
<p>从以上精度对比可以看出,对<code>mobilenet</code><code>imagenet</code>上的分类模型进行离线量化后 <code>top1</code>精度损失为<code>0.77%</code><code>top5</code>精度损失为<code>0.46%</code>. </p></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../../js/base.js" defer></script>
<script src="../../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
因为 它太大了无法显示 source diff 。你可以改为 查看blob
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph horiz-adv-x="0" />
<glyph horiz-adv-x="400" />
<glyph unicode=" " />
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xa0;" />
<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
<glyph unicode="&#x2000;" horiz-adv-x="650" />
<glyph unicode="&#x2001;" horiz-adv-x="1300" />
<glyph unicode="&#x2002;" horiz-adv-x="650" />
<glyph unicode="&#x2003;" horiz-adv-x="1300" />
<glyph unicode="&#x2004;" horiz-adv-x="433" />
<glyph unicode="&#x2005;" horiz-adv-x="325" />
<glyph unicode="&#x2006;" horiz-adv-x="216" />
<glyph unicode="&#x2007;" horiz-adv-x="216" />
<glyph unicode="&#x2008;" horiz-adv-x="162" />
<glyph unicode="&#x2009;" horiz-adv-x="260" />
<glyph unicode="&#x200a;" horiz-adv-x="72" />
<glyph unicode="&#x202f;" horiz-adv-x="260" />
<glyph unicode="&#x205f;" horiz-adv-x="325" />
<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
</font>
</defs></svg>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="None">
<link rel="shortcut icon" href="img/favicon.ico">
<title>My Docs</title>
<link href="css/bootstrap-custom.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="js/jquery-1.10.2.min.js" defer></script>
<script src="js/bootstrap-3.0.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="homepage">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href=".">My Docs</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="active">
<a href=".">Welcome to MkDocs</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="docs/">PaddleSlim</a>
</li>
<li >
<a href="docs/table_latency/">硬件延时评估表</a>
</li>
<li class="dropdown-submenu">
<a href="#">Api</a>
<ul class="dropdown-menu">
<li >
<a href="docs/api/analysis_api/">模型分析API文档</a>
</li>
<li >
<a href="docs/api/api_guide/">PaddleSlim API文档导航</a>
</li>
<li >
<a href="docs/api/nas_api/">paddleslim.nas API文档</a>
</li>
<li >
<a href="docs/api/prune_api/">卷积通道剪裁API文档</a>
</li>
<li >
<a href="docs/api/quantization_api/">paddleslim.quant API文档</a>
</li>
<li >
<a href="docs/api/search_space/">paddleslim.nas 提供的搜索空间:</a>
</li>
<li >
<a href="docs/api/single_distiller_api/">paddleslim.dist API文档</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#">Tutorials</a>
<ul class="dropdown-menu">
<li >
<a href="docs/tutorials/demo_guide/">Demo guide</a>
</li>
<li >
<a href="docs/tutorials/nas_demo/">网络结构搜索示例</a>
</li>
<li >
<a href="docs/tutorials/quant_aware_demo/">在线量化示例</a>
</li>
<li >
<a href="docs/tutorials/quant_embedding_demo/">Embedding量化示例</a>
</li>
<li >
<a href="docs/tutorials/quant_post_demo/">离线量化示例</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="disabled">
<a rel="next" >
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="docs/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#welcome-to-mkdocs">Welcome to MkDocs</a></li>
<li><a href="#commands">Commands</a></li>
<li><a href="#project-layout">Project layout</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h1 id="welcome-to-mkdocs">Welcome to MkDocs</h1>
<p>For full documentation visit <a href="https://mkdocs.org">mkdocs.org</a>.</p>
<h2 id="commands">Commands</h2>
<ul>
<li><code>mkdocs new [dir-name]</code> - Create a new project.</li>
<li><code>mkdocs serve</code> - Start the live-reloading docs server.</li>
<li><code>mkdocs build</code> - Build the documentation site.</li>
<li><code>mkdocs help</code> - Print this help message.</li>
</ul>
<h2 id="project-layout">Project layout</h2>
<pre><code>mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
</code></pre></div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = ".",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="js/base.js" defer></script>
<script src="search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Search</h4>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!--
MkDocs version : 1.0.4
Build Date UTC : 2019-12-19 11:23:36
-->
function getSearchTerm()
{
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == 'q')
{
return sParameterName[1];
}
}
}
$(document).ready(function() {
var search_term = getSearchTerm(),
$search_modal = $('#mkdocs_search_modal'),
$keyboard_modal = $('#mkdocs_keyboard_modal');
if(search_term){
$search_modal.modal();
}
// make sure search input gets autofocus everytime modal opens.
$search_modal.on('shown.bs.modal', function () {
$search_modal.find('#mkdocs-search-query').focus();
});
// Close search modal when result is selected
// The links get added later so listen to parent
$('#mkdocs-search-results').click(function(e) {
if ($(e.target).is('a')) {
$search_modal.modal('hide');
}
});
// Populate keyboard modal with proper Keys
$keyboard_modal.find('.help.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.help];
$keyboard_modal.find('.prev.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.previous];
$keyboard_modal.find('.next.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.next];
$keyboard_modal.find('.search.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.search];
// Keyboard navigation
document.addEventListener("keydown", function(e) {
if ($(e.target).is(':input')) return true;
var key = e.which || e.keyCode || window.event && window.event.keyCode;
var page;
switch (key) {
case shortcuts.next:
page = $('[role="navigation"] a:contains(Next):first').prop('href');
break;
case shortcuts.previous:
page = $('[role="navigation"] a:contains(Previous):first').prop('href');
break;
case shortcuts.search:
e.preventDefault();
$keyboard_modal.modal('hide');
$search_modal.modal('show');
$search_modal.find('#mkdocs-search-query').focus();
break;
case shortcuts.help:
$search_modal.modal('hide');
$keyboard_modal.modal('show');
break;
default: break;
}
if (page) {
$keyboard_modal.modal('hide');
window.location.href = page;
}
});
$('table').addClass('table table-striped table-hover');
// Improve the scrollspy behaviour when users click on a TOC item.
$(".bs-sidenav a").on("click", function() {
var clicked = this;
setTimeout(function() {
var active = $('.nav li.active a');
active = active[active.length - 1];
if (clicked !== active) {
$(active).parent().removeClass("active");
$(clicked).parent().addClass("active");
}
}, 50);
});
});
$('body').scrollspy({
target: '.bs-sidebar',
offset: 100
});
/* Prevent disabled links from causing a page reload */
$("li.disabled a").click(function() {
event.preventDefault();
});
// See https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
// We only list common keys below. Obscure keys are omited and their use is discouraged.
var keyCodes = {
8: 'backspace',
9: 'tab',
13: 'enter',
16: 'shift',
17: 'ctrl',
18: 'alt',
19: 'pause/break',
20: 'caps lock',
27: 'escape',
32: 'spacebar',
33: 'page up',
34: 'page down',
35: 'end',
36: 'home',
37: '&larr;',
38: '&uarr;',
39: '&rarr;',
40: '&darr;',
45: 'insert',
46: 'delete',
48: '0',
49: '1',
50: '2',
51: '3',
52: '4',
53: '5',
54: '6',
55: '7',
56: '8',
57: '9',
65: 'a',
66: 'b',
67: 'c',
68: 'd',
69: 'e',
70: 'f',
71: 'g',
72: 'h',
73: 'i',
74: 'j',
75: 'k',
76: 'l',
77: 'm',
78: 'n',
79: 'o',
80: 'p',
81: 'q',
82: 'r',
83: 's',
84: 't',
85: 'u',
86: 'v',
87: 'w',
88: 'x',
89: 'y',
90: 'z',
91: 'Left Windows Key / Left ⌘',
92: 'Right Windows Key',
93: 'Windows Menu / Right ⌘',
96: 'numpad 0',
97: 'numpad 1',
98: 'numpad 2',
99: 'numpad 3',
100: 'numpad 4',
101: 'numpad 5',
102: 'numpad 6',
103: 'numpad 7',
104: 'numpad 8',
105: 'numpad 9',
106: 'multiply',
107: 'add',
109: 'subtract',
110: 'decimal point',
111: 'divide',
112: 'f1',
113: 'f2',
114: 'f3',
115: 'f4',
116: 'f5',
117: 'f6',
118: 'f7',
119: 'f8',
120: 'f9',
121: 'f10',
122: 'f11',
123: 'f12',
124: 'f13',
125: 'f14',
126: 'f15',
127: 'f16',
128: 'f17',
129: 'f18',
130: 'f19',
131: 'f20',
132: 'f21',
133: 'f22',
134: 'f23',
135: 'f24',
144: 'num lock',
145: 'scroll lock',
186: '&semi;',
187: '&equals;',
188: '&comma;',
189: '&hyphen;',
190: '&period;',
191: '&quest;',
192: '&grave;',
219: '&lsqb;',
220: '&bsol;',
221: '&rsqb;',
222: '&apos;',
};
/*!
* Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
site_name: PaddleSlim Docs
nav:
- Home: index.md
- 教程:
- 离线量化: tutorials/quant_post_demo.md
- 量化训练: tutorials/quant_aware_demo.md
- Embedding量化: tutorials/quant_embedding_demo.md
- SA搜索: tutorials/nas_demo.md
- API:
- 量化: api/quantization_api.md
- 剪枝: api/prune_api.md
- 敏感度分析: api/analysis_api.md
- 蒸馏: api/single_distiller_api.md
- SA搜索: api/nas_api.md
- 搜索空间: api/search_space.md
theme: readthedocs
markdown_extensions:
- pymdownx.arithmatex
- admonition
- codehilite
extra_javascript:
- mathjax-config.js
- MathJax.js?config=TeX-AMS-MML_HTMLorMML
/**
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.1.6
* Copyright (C) 2018 Oliver Nightingale
* @license MIT
*/
;(function(){
/**
* A convenience function for configuring and constructing
* a new lunr Index.
*
* A lunr.Builder instance is created and the pipeline setup
* with a trimmer, stop word filter and stemmer.
*
* This builder object is yielded to the configuration function
* that is passed as a parameter, allowing the list of fields
* and other builder parameters to be customised.
*
* All documents _must_ be added within the passed config function.
*
* @example
* var idx = lunr(function () {
* this.field('title')
* this.field('body')
* this.ref('id')
*
* documents.forEach(function (doc) {
* this.add(doc)
* }, this)
* })
*
* @see {@link lunr.Builder}
* @see {@link lunr.Pipeline}
* @see {@link lunr.trimmer}
* @see {@link lunr.stopWordFilter}
* @see {@link lunr.stemmer}
* @namespace {function} lunr
*/
var lunr = function (config) {
var builder = new lunr.Builder
builder.pipeline.add(
lunr.trimmer,
lunr.stopWordFilter,
lunr.stemmer
)
builder.searchPipeline.add(
lunr.stemmer
)
config.call(builder, builder)
return builder.build()
}
lunr.version = "2.1.6"
/*!
* lunr.utils
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* A namespace containing utils for the rest of the lunr library
*/
lunr.utils = {}
/**
* Print a warning message to the console.
*
* @param {String} message The message to be printed.
* @memberOf Utils
*/
lunr.utils.warn = (function (global) {
/* eslint-disable no-console */
return function (message) {
if (global.console && console.warn) {
console.warn(message)
}
}
/* eslint-enable no-console */
})(this)
/**
* Convert an object to a string.
*
* In the case of `null` and `undefined` the function returns
* the empty string, in all other cases the result of calling
* `toString` on the passed object is returned.
*
* @param {Any} obj The object to convert to a string.
* @return {String} string representation of the passed object.
* @memberOf Utils
*/
lunr.utils.asString = function (obj) {
if (obj === void 0 || obj === null) {
return ""
} else {
return obj.toString()
}
}
lunr.FieldRef = function (docRef, fieldName, stringValue) {
this.docRef = docRef
this.fieldName = fieldName
this._stringValue = stringValue
}
lunr.FieldRef.joiner = "/"
lunr.FieldRef.fromString = function (s) {
var n = s.indexOf(lunr.FieldRef.joiner)
if (n === -1) {
throw "malformed field ref string"
}
var fieldRef = s.slice(0, n),
docRef = s.slice(n + 1)
return new lunr.FieldRef (docRef, fieldRef, s)
}
lunr.FieldRef.prototype.toString = function () {
if (this._stringValue == undefined) {
this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef
}
return this._stringValue
}
/**
* A function to calculate the inverse document frequency for
* a posting. This is shared between the builder and the index
*
* @private
* @param {object} posting - The posting for a given term
* @param {number} documentCount - The total number of documents.
*/
lunr.idf = function (posting, documentCount) {
var documentsWithTerm = 0
for (var fieldName in posting) {
if (fieldName == '_index') continue // Ignore the term index, its not a field
documentsWithTerm += Object.keys(posting[fieldName]).length
}
var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)
return Math.log(1 + Math.abs(x))
}
/**
* A token wraps a string representation of a token
* as it is passed through the text processing pipeline.
*
* @constructor
* @param {string} [str=''] - The string token being wrapped.
* @param {object} [metadata={}] - Metadata associated with this token.
*/
lunr.Token = function (str, metadata) {
this.str = str || ""
this.metadata = metadata || {}
}
/**
* Returns the token string that is being wrapped by this object.
*
* @returns {string}
*/
lunr.Token.prototype.toString = function () {
return this.str
}
/**
* A token update function is used when updating or optionally
* when cloning a token.
*
* @callback lunr.Token~updateFunction
* @param {string} str - The string representation of the token.
* @param {Object} metadata - All metadata associated with this token.
*/
/**
* Applies the given function to the wrapped string token.
*
* @example
* token.update(function (str, metadata) {
* return str.toUpperCase()
* })
*
* @param {lunr.Token~updateFunction} fn - A function to apply to the token string.
* @returns {lunr.Token}
*/
lunr.Token.prototype.update = function (fn) {
this.str = fn(this.str, this.metadata)
return this
}
/**
* Creates a clone of this token. Optionally a function can be
* applied to the cloned token.
*
* @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.
* @returns {lunr.Token}
*/
lunr.Token.prototype.clone = function (fn) {
fn = fn || function (s) { return s }
return new lunr.Token (fn(this.str, this.metadata), this.metadata)
}
/*!
* lunr.tokenizer
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* A function for splitting a string into tokens ready to be inserted into
* the search index. Uses `lunr.tokenizer.separator` to split strings, change
* the value of this property to change how strings are split into tokens.
*
* This tokenizer will convert its parameter to a string by calling `toString` and
* then will split this string on the character in `lunr.tokenizer.separator`.
* Arrays will have their elements converted to strings and wrapped in a lunr.Token.
*
* @static
* @param {?(string|object|object[])} obj - The object to convert into tokens
* @returns {lunr.Token[]}
*/
lunr.tokenizer = function (obj) {
if (obj == null || obj == undefined) {
return []
}
if (Array.isArray(obj)) {
return obj.map(function (t) {
return new lunr.Token(lunr.utils.asString(t).toLowerCase())
})
}
var str = obj.toString().trim().toLowerCase(),
len = str.length,
tokens = []
for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {
var char = str.charAt(sliceEnd),
sliceLength = sliceEnd - sliceStart
if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {
if (sliceLength > 0) {
tokens.push(
new lunr.Token (str.slice(sliceStart, sliceEnd), {
position: [sliceStart, sliceLength],
index: tokens.length
})
)
}
sliceStart = sliceEnd + 1
}
}
return tokens
}
/**
* The separator used to split a string into tokens. Override this property to change the behaviour of
* `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.
*
* @static
* @see lunr.tokenizer
*/
lunr.tokenizer.separator = /[\s\-]+/
/*!
* lunr.Pipeline
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* lunr.Pipelines maintain an ordered list of functions to be applied to all
* tokens in documents entering the search index and queries being ran against
* the index.
*
* An instance of lunr.Index created with the lunr shortcut will contain a
* pipeline with a stop word filter and an English language stemmer. Extra
* functions can be added before or after either of these functions or these
* default functions can be removed.
*
* When run the pipeline will call each function in turn, passing a token, the
* index of that token in the original list of all tokens and finally a list of
* all the original tokens.
*
* The output of functions in the pipeline will be passed to the next function
* in the pipeline. To exclude a token from entering the index the function
* should return undefined, the rest of the pipeline will not be called with
* this token.
*
* For serialisation of pipelines to work, all functions used in an instance of
* a pipeline should be registered with lunr.Pipeline. Registered functions can
* then be loaded. If trying to load a serialised pipeline that uses functions
* that are not registered an error will be thrown.
*
* If not planning on serialising the pipeline then registering pipeline functions
* is not necessary.
*
* @constructor
*/
lunr.Pipeline = function () {
this._stack = []
}
lunr.Pipeline.registeredFunctions = Object.create(null)
/**
* A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token
* string as well as all known metadata. A pipeline function can mutate the token string
* or mutate (or add) metadata for a given token.
*
* A pipeline function can indicate that the passed token should be discarded by returning
* null. This token will not be passed to any downstream pipeline functions and will not be
* added to the index.
*
* Multiple tokens can be returned by returning an array of tokens. Each token will be passed
* to any downstream pipeline functions and all will returned tokens will be added to the index.
*
* Any number of pipeline functions may be chained together using a lunr.Pipeline.
*
* @interface lunr.PipelineFunction
* @param {lunr.Token} token - A token from the document being processed.
* @param {number} i - The index of this token in the complete list of tokens for this document/field.
* @param {lunr.Token[]} tokens - All tokens for this document/field.
* @returns {(?lunr.Token|lunr.Token[])}
*/
/**
* Register a function with the pipeline.
*
* Functions that are used in the pipeline should be registered if the pipeline
* needs to be serialised, or a serialised pipeline needs to be loaded.
*
* Registering a function does not add it to a pipeline, functions must still be
* added to instances of the pipeline for them to be used when running a pipeline.
*
* @param {lunr.PipelineFunction} fn - The function to check for.
* @param {String} label - The label to register this function with
*/
lunr.Pipeline.registerFunction = function (fn, label) {
if (label in this.registeredFunctions) {
lunr.utils.warn('Overwriting existing registered function: ' + label)
}
fn.label = label
lunr.Pipeline.registeredFunctions[fn.label] = fn
}
/**
* Warns if the function is not registered as a Pipeline function.
*
* @param {lunr.PipelineFunction} fn - The function to check for.
* @private
*/
lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {
var isRegistered = fn.label && (fn.label in this.registeredFunctions)
if (!isRegistered) {
lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn)
}
}
/**
* Loads a previously serialised pipeline.
*
* All functions to be loaded must already be registered with lunr.Pipeline.
* If any function from the serialised data has not been registered then an
* error will be thrown.
*
* @param {Object} serialised - The serialised pipeline to load.
* @returns {lunr.Pipeline}
*/
lunr.Pipeline.load = function (serialised) {
var pipeline = new lunr.Pipeline
serialised.forEach(function (fnName) {
var fn = lunr.Pipeline.registeredFunctions[fnName]
if (fn) {
pipeline.add(fn)
} else {
throw new Error('Cannot load unregistered function: ' + fnName)
}
})
return pipeline
}
/**
* Adds new functions to the end of the pipeline.
*
* Logs a warning if the function has not been registered.
*
* @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.
*/
lunr.Pipeline.prototype.add = function () {
var fns = Array.prototype.slice.call(arguments)
fns.forEach(function (fn) {
lunr.Pipeline.warnIfFunctionNotRegistered(fn)
this._stack.push(fn)
}, this)
}
/**
* Adds a single function after a function that already exists in the
* pipeline.
*
* Logs a warning if the function has not been registered.
*
* @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.
* @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.
*/
lunr.Pipeline.prototype.after = function (existingFn, newFn) {
lunr.Pipeline.warnIfFunctionNotRegistered(newFn)
var pos = this._stack.indexOf(existingFn)
if (pos == -1) {
throw new Error('Cannot find existingFn')
}
pos = pos + 1
this._stack.splice(pos, 0, newFn)
}
/**
* Adds a single function before a function that already exists in the
* pipeline.
*
* Logs a warning if the function has not been registered.
*
* @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.
* @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.
*/
lunr.Pipeline.prototype.before = function (existingFn, newFn) {
lunr.Pipeline.warnIfFunctionNotRegistered(newFn)
var pos = this._stack.indexOf(existingFn)
if (pos == -1) {
throw new Error('Cannot find existingFn')
}
this._stack.splice(pos, 0, newFn)
}
/**
* Removes a function from the pipeline.
*
* @param {lunr.PipelineFunction} fn The function to remove from the pipeline.
*/
lunr.Pipeline.prototype.remove = function (fn) {
var pos = this._stack.indexOf(fn)
if (pos == -1) {
return
}
this._stack.splice(pos, 1)
}
/**
* Runs the current list of functions that make up the pipeline against the
* passed tokens.
*
* @param {Array} tokens The tokens to run through the pipeline.
* @returns {Array}
*/
lunr.Pipeline.prototype.run = function (tokens) {
var stackLength = this._stack.length
for (var i = 0; i < stackLength; i++) {
var fn = this._stack[i]
var memo = []
for (var j = 0; j < tokens.length; j++) {
var result = fn(tokens[j], j, tokens)
if (result === void 0 || result === '') continue
if (result instanceof Array) {
for (var k = 0; k < result.length; k++) {
memo.push(result[k])
}
} else {
memo.push(result)
}
}
tokens = memo
}
return tokens
}
/**
* Convenience method for passing a string through a pipeline and getting
* strings out. This method takes care of wrapping the passed string in a
* token and mapping the resulting tokens back to strings.
*
* @param {string} str - The string to pass through the pipeline.
* @returns {string[]}
*/
lunr.Pipeline.prototype.runString = function (str) {
var token = new lunr.Token (str)
return this.run([token]).map(function (t) {
return t.toString()
})
}
/**
* Resets the pipeline by removing any existing processors.
*
*/
lunr.Pipeline.prototype.reset = function () {
this._stack = []
}
/**
* Returns a representation of the pipeline ready for serialisation.
*
* Logs a warning if the function has not been registered.
*
* @returns {Array}
*/
lunr.Pipeline.prototype.toJSON = function () {
return this._stack.map(function (fn) {
lunr.Pipeline.warnIfFunctionNotRegistered(fn)
return fn.label
})
}
/*!
* lunr.Vector
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* A vector is used to construct the vector space of documents and queries. These
* vectors support operations to determine the similarity between two documents or
* a document and a query.
*
* Normally no parameters are required for initializing a vector, but in the case of
* loading a previously dumped vector the raw elements can be provided to the constructor.
*
* For performance reasons vectors are implemented with a flat array, where an elements
* index is immediately followed by its value. E.g. [index, value, index, value]. This
* allows the underlying array to be as sparse as possible and still offer decent
* performance when being used for vector calculations.
*
* @constructor
* @param {Number[]} [elements] - The flat list of element index and element value pairs.
*/
lunr.Vector = function (elements) {
this._magnitude = 0
this.elements = elements || []
}
/**
* Calculates the position within the vector to insert a given index.
*
* This is used internally by insert and upsert. If there are duplicate indexes then
* the position is returned as if the value for that index were to be updated, but it
* is the callers responsibility to check whether there is a duplicate at that index
*
* @param {Number} insertIdx - The index at which the element should be inserted.
* @returns {Number}
*/
lunr.Vector.prototype.positionForIndex = function (index) {
// For an empty vector the tuple can be inserted at the beginning
if (this.elements.length == 0) {
return 0
}
var start = 0,
end = this.elements.length / 2,
sliceLength = end - start,
pivotPoint = Math.floor(sliceLength / 2),
pivotIndex = this.elements[pivotPoint * 2]
while (sliceLength > 1) {
if (pivotIndex < index) {
start = pivotPoint
}
if (pivotIndex > index) {
end = pivotPoint
}
if (pivotIndex == index) {
break
}
sliceLength = end - start
pivotPoint = start + Math.floor(sliceLength / 2)
pivotIndex = this.elements[pivotPoint * 2]
}
if (pivotIndex == index) {
return pivotPoint * 2
}
if (pivotIndex > index) {
return pivotPoint * 2
}
if (pivotIndex < index) {
return (pivotPoint + 1) * 2
}
}
/**
* Inserts an element at an index within the vector.
*
* Does not allow duplicates, will throw an error if there is already an entry
* for this index.
*
* @param {Number} insertIdx - The index at which the element should be inserted.
* @param {Number} val - The value to be inserted into the vector.
*/
lunr.Vector.prototype.insert = function (insertIdx, val) {
this.upsert(insertIdx, val, function () {
throw "duplicate index"
})
}
/**
* Inserts or updates an existing index within the vector.
*
* @param {Number} insertIdx - The index at which the element should be inserted.
* @param {Number} val - The value to be inserted into the vector.
* @param {function} fn - A function that is called for updates, the existing value and the
* requested value are passed as arguments
*/
lunr.Vector.prototype.upsert = function (insertIdx, val, fn) {
this._magnitude = 0
var position = this.positionForIndex(insertIdx)
if (this.elements[position] == insertIdx) {
this.elements[position + 1] = fn(this.elements[position + 1], val)
} else {
this.elements.splice(position, 0, insertIdx, val)
}
}
/**
* Calculates the magnitude of this vector.
*
* @returns {Number}
*/
lunr.Vector.prototype.magnitude = function () {
if (this._magnitude) return this._magnitude
var sumOfSquares = 0,
elementsLength = this.elements.length
for (var i = 1; i < elementsLength; i += 2) {
var val = this.elements[i]
sumOfSquares += val * val
}
return this._magnitude = Math.sqrt(sumOfSquares)
}
/**
* Calculates the dot product of this vector and another vector.
*
* @param {lunr.Vector} otherVector - The vector to compute the dot product with.
* @returns {Number}
*/
lunr.Vector.prototype.dot = function (otherVector) {
var dotProduct = 0,
a = this.elements, b = otherVector.elements,
aLen = a.length, bLen = b.length,
aVal = 0, bVal = 0,
i = 0, j = 0
while (i < aLen && j < bLen) {
aVal = a[i], bVal = b[j]
if (aVal < bVal) {
i += 2
} else if (aVal > bVal) {
j += 2
} else if (aVal == bVal) {
dotProduct += a[i + 1] * b[j + 1]
i += 2
j += 2
}
}
return dotProduct
}
/**
* Calculates the cosine similarity between this vector and another
* vector.
*
* @param {lunr.Vector} otherVector - The other vector to calculate the
* similarity with.
* @returns {Number}
*/
lunr.Vector.prototype.similarity = function (otherVector) {
return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude())
}
/**
* Converts the vector to an array of the elements within the vector.
*
* @returns {Number[]}
*/
lunr.Vector.prototype.toArray = function () {
var output = new Array (this.elements.length / 2)
for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {
output[j] = this.elements[i]
}
return output
}
/**
* A JSON serializable representation of the vector.
*
* @returns {Number[]}
*/
lunr.Vector.prototype.toJSON = function () {
return this.elements
}
/* eslint-disable */
/*!
* lunr.stemmer
* Copyright (C) 2018 Oliver Nightingale
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
*/
/**
* lunr.stemmer is an english language stemmer, this is a JavaScript
* implementation of the PorterStemmer taken from http://tartarus.org/~martin
*
* @static
* @implements {lunr.PipelineFunction}
* @param {lunr.Token} token - The string to stem
* @returns {lunr.Token}
* @see {@link lunr.Pipeline}
*/
lunr.stemmer = (function(){
var step2list = {
"ational" : "ate",
"tional" : "tion",
"enci" : "ence",
"anci" : "ance",
"izer" : "ize",
"bli" : "ble",
"alli" : "al",
"entli" : "ent",
"eli" : "e",
"ousli" : "ous",
"ization" : "ize",
"ation" : "ate",
"ator" : "ate",
"alism" : "al",
"iveness" : "ive",
"fulness" : "ful",
"ousness" : "ous",
"aliti" : "al",
"iviti" : "ive",
"biliti" : "ble",
"logi" : "log"
},
step3list = {
"icate" : "ic",
"ative" : "",
"alize" : "al",
"iciti" : "ic",
"ical" : "ic",
"ful" : "",
"ness" : ""
},
c = "[^aeiou]", // consonant
v = "[aeiouy]", // vowel
C = c + "[^aeiouy]*", // consonant sequence
V = v + "[aeiou]*", // vowel sequence
mgr0 = "^(" + C + ")?" + V + C, // [C]VC... is m>0
meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$", // [C]VC[V] is m=1
mgr1 = "^(" + C + ")?" + V + C + V + C, // [C]VCVC... is m>1
s_v = "^(" + C + ")?" + v; // vowel in stem
var re_mgr0 = new RegExp(mgr0);
var re_mgr1 = new RegExp(mgr1);
var re_meq1 = new RegExp(meq1);
var re_s_v = new RegExp(s_v);
var re_1a = /^(.+?)(ss|i)es$/;
var re2_1a = /^(.+?)([^s])s$/;
var re_1b = /^(.+?)eed$/;
var re2_1b = /^(.+?)(ed|ing)$/;
var re_1b_2 = /.$/;
var re2_1b_2 = /(at|bl|iz)$/;
var re3_1b_2 = new RegExp("([^aeiouylsz])\\1$");
var re4_1b_2 = new RegExp("^" + C + v + "[^aeiouwxy]$");
var re_1c = /^(.+?[^aeiou])y$/;
var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
var re2_4 = /^(.+?)(s|t)(ion)$/;
var re_5 = /^(.+?)e$/;
var re_5_1 = /ll$/;
var re3_5 = new RegExp("^" + C + v + "[^aeiouwxy]$");
var porterStemmer = function porterStemmer(w) {
var stem,
suffix,
firstch,
re,
re2,
re3,
re4;
if (w.length < 3) { return w; }
firstch = w.substr(0,1);
if (firstch == "y") {
w = firstch.toUpperCase() + w.substr(1);
}
// Step 1a
re = re_1a
re2 = re2_1a;
if (re.test(w)) { w = w.replace(re,"$1$2"); }
else if (re2.test(w)) { w = w.replace(re2,"$1$2"); }
// Step 1b
re = re_1b;
re2 = re2_1b;
if (re.test(w)) {
var fp = re.exec(w);
re = re_mgr0;
if (re.test(fp[1])) {
re = re_1b_2;
w = w.replace(re,"");
}
} else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = re_s_v;
if (re2.test(stem)) {
w = stem;
re2 = re2_1b_2;
re3 = re3_1b_2;
re4 = re4_1b_2;
if (re2.test(w)) { w = w + "e"; }
else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,""); }
else if (re4.test(w)) { w = w + "e"; }
}
}
// Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)
re = re_1c;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
w = stem + "i";
}
// Step 2
re = re_2;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = re_mgr0;
if (re.test(stem)) {
w = stem + step2list[suffix];
}
}
// Step 3
re = re_3;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = re_mgr0;
if (re.test(stem)) {
w = stem + step3list[suffix];
}
}
// Step 4
re = re_4;
re2 = re2_4;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = re_mgr1;
if (re.test(stem)) {
w = stem;
}
} else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = re_mgr1;
if (re2.test(stem)) {
w = stem;
}
}
// Step 5
re = re_5;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = re_mgr1;
re2 = re_meq1;
re3 = re3_5;
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {
w = stem;
}
}
re = re_5_1;
re2 = re_mgr1;
if (re.test(w) && re2.test(w)) {
re = re_1b_2;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y") {
w = firstch.toLowerCase() + w.substr(1);
}
return w;
};
return function (token) {
return token.update(porterStemmer);
}
})();
lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')
/*!
* lunr.stopWordFilter
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* lunr.generateStopWordFilter builds a stopWordFilter function from the provided
* list of stop words.
*
* The built in lunr.stopWordFilter is built using this generator and can be used
* to generate custom stopWordFilters for applications or non English languages.
*
* @param {Array} token The token to pass through the filter
* @returns {lunr.PipelineFunction}
* @see lunr.Pipeline
* @see lunr.stopWordFilter
*/
lunr.generateStopWordFilter = function (stopWords) {
var words = stopWords.reduce(function (memo, stopWord) {
memo[stopWord] = stopWord
return memo
}, {})
return function (token) {
if (token && words[token.toString()] !== token.toString()) return token
}
}
/**
* lunr.stopWordFilter is an English language stop word list filter, any words
* contained in the list will not be passed through the filter.
*
* This is intended to be used in the Pipeline. If the token does not pass the
* filter then undefined will be returned.
*
* @implements {lunr.PipelineFunction}
* @params {lunr.Token} token - A token to check for being a stop word.
* @returns {lunr.Token}
* @see {@link lunr.Pipeline}
*/
lunr.stopWordFilter = lunr.generateStopWordFilter([
'a',
'able',
'about',
'across',
'after',
'all',
'almost',
'also',
'am',
'among',
'an',
'and',
'any',
'are',
'as',
'at',
'be',
'because',
'been',
'but',
'by',
'can',
'cannot',
'could',
'dear',
'did',
'do',
'does',
'either',
'else',
'ever',
'every',
'for',
'from',
'get',
'got',
'had',
'has',
'have',
'he',
'her',
'hers',
'him',
'his',
'how',
'however',
'i',
'if',
'in',
'into',
'is',
'it',
'its',
'just',
'least',
'let',
'like',
'likely',
'may',
'me',
'might',
'most',
'must',
'my',
'neither',
'no',
'nor',
'not',
'of',
'off',
'often',
'on',
'only',
'or',
'other',
'our',
'own',
'rather',
'said',
'say',
'says',
'she',
'should',
'since',
'so',
'some',
'than',
'that',
'the',
'their',
'them',
'then',
'there',
'these',
'they',
'this',
'tis',
'to',
'too',
'twas',
'us',
'wants',
'was',
'we',
'were',
'what',
'when',
'where',
'which',
'while',
'who',
'whom',
'why',
'will',
'with',
'would',
'yet',
'you',
'your'
])
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')
/*!
* lunr.trimmer
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* lunr.trimmer is a pipeline function for trimming non word
* characters from the beginning and end of tokens before they
* enter the index.
*
* This implementation may not work correctly for non latin
* characters and should either be removed or adapted for use
* with languages with non-latin characters.
*
* @static
* @implements {lunr.PipelineFunction}
* @param {lunr.Token} token The token to pass through the filter
* @returns {lunr.Token}
* @see lunr.Pipeline
*/
lunr.trimmer = function (token) {
return token.update(function (s) {
return s.replace(/^\W+/, '').replace(/\W+$/, '')
})
}
lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')
/*!
* lunr.TokenSet
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* A token set is used to store the unique list of all tokens
* within an index. Token sets are also used to represent an
* incoming query to the index, this query token set and index
* token set are then intersected to find which tokens to look
* up in the inverted index.
*
* A token set can hold multiple tokens, as in the case of the
* index token set, or it can hold a single token as in the
* case of a simple query token set.
*
* Additionally token sets are used to perform wildcard matching.
* Leading, contained and trailing wildcards are supported, and
* from this edit distance matching can also be provided.
*
* Token sets are implemented as a minimal finite state automata,
* where both common prefixes and suffixes are shared between tokens.
* This helps to reduce the space used for storing the token set.
*
* @constructor
*/
lunr.TokenSet = function () {
this.final = false
this.edges = {}
this.id = lunr.TokenSet._nextId
lunr.TokenSet._nextId += 1
}
/**
* Keeps track of the next, auto increment, identifier to assign
* to a new tokenSet.
*
* TokenSets require a unique identifier to be correctly minimised.
*
* @private
*/
lunr.TokenSet._nextId = 1
/**
* Creates a TokenSet instance from the given sorted array of words.
*
* @param {String[]} arr - A sorted array of strings to create the set from.
* @returns {lunr.TokenSet}
* @throws Will throw an error if the input array is not sorted.
*/
lunr.TokenSet.fromArray = function (arr) {
var builder = new lunr.TokenSet.Builder
for (var i = 0, len = arr.length; i < len; i++) {
builder.insert(arr[i])
}
builder.finish()
return builder.root
}
/**
* Creates a token set from a query clause.
*
* @private
* @param {Object} clause - A single clause from lunr.Query.
* @param {string} clause.term - The query clause term.
* @param {number} [clause.editDistance] - The optional edit distance for the term.
* @returns {lunr.TokenSet}
*/
lunr.TokenSet.fromClause = function (clause) {
if ('editDistance' in clause) {
return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)
} else {
return lunr.TokenSet.fromString(clause.term)
}
}
/**
* Creates a token set representing a single string with a specified
* edit distance.
*
* Insertions, deletions, substitutions and transpositions are each
* treated as an edit distance of 1.
*
* Increasing the allowed edit distance will have a dramatic impact
* on the performance of both creating and intersecting these TokenSets.
* It is advised to keep the edit distance less than 3.
*
* @param {string} str - The string to create the token set from.
* @param {number} editDistance - The allowed edit distance to match.
* @returns {lunr.Vector}
*/
lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
var root = new lunr.TokenSet
var stack = [{
node: root,
editsRemaining: editDistance,
str: str
}]
while (stack.length) {
var frame = stack.pop()
// no edit
if (frame.str.length > 0) {
var char = frame.str.charAt(0),
noEditNode
if (char in frame.node.edges) {
noEditNode = frame.node.edges[char]
} else {
noEditNode = new lunr.TokenSet
frame.node.edges[char] = noEditNode
}
if (frame.str.length == 1) {
noEditNode.final = true
} else {
stack.push({
node: noEditNode,
editsRemaining: frame.editsRemaining,
str: frame.str.slice(1)
})
}
}
// deletion
// can only do a deletion if we have enough edits remaining
// and if there are characters left to delete in the string
if (frame.editsRemaining > 0 && frame.str.length > 1) {
var char = frame.str.charAt(1),
deletionNode
if (char in frame.node.edges) {
deletionNode = frame.node.edges[char]
} else {
deletionNode = new lunr.TokenSet
frame.node.edges[char] = deletionNode
}
if (frame.str.length <= 2) {
deletionNode.final = true
} else {
stack.push({
node: deletionNode,
editsRemaining: frame.editsRemaining - 1,
str: frame.str.slice(2)
})
}
}
// deletion
// just removing the last character from the str
if (frame.editsRemaining > 0 && frame.str.length == 1) {
frame.node.final = true
}
// substitution
// can only do a substitution if we have enough edits remaining
// and if there are characters left to substitute
if (frame.editsRemaining > 0 && frame.str.length >= 1) {
if ("*" in frame.node.edges) {
var substitutionNode = frame.node.edges["*"]
} else {
var substitutionNode = new lunr.TokenSet
frame.node.edges["*"] = substitutionNode
}
if (frame.str.length == 1) {
substitutionNode.final = true
} else {
stack.push({
node: substitutionNode,
editsRemaining: frame.editsRemaining - 1,
str: frame.str.slice(1)
})
}
}
// insertion
// can only do insertion if there are edits remaining
if (frame.editsRemaining > 0) {
if ("*" in frame.node.edges) {
var insertionNode = frame.node.edges["*"]
} else {
var insertionNode = new lunr.TokenSet
frame.node.edges["*"] = insertionNode
}
if (frame.str.length == 0) {
insertionNode.final = true
} else {
stack.push({
node: insertionNode,
editsRemaining: frame.editsRemaining - 1,
str: frame.str
})
}
}
// transposition
// can only do a transposition if there are edits remaining
// and there are enough characters to transpose
if (frame.editsRemaining > 0 && frame.str.length > 1) {
var charA = frame.str.charAt(0),
charB = frame.str.charAt(1),
transposeNode
if (charB in frame.node.edges) {
transposeNode = frame.node.edges[charB]
} else {
transposeNode = new lunr.TokenSet
frame.node.edges[charB] = transposeNode
}
if (frame.str.length == 1) {
transposeNode.final = true
} else {
stack.push({
node: transposeNode,
editsRemaining: frame.editsRemaining - 1,
str: charA + frame.str.slice(2)
})
}
}
}
return root
}
/**
* Creates a TokenSet from a string.
*
* The string may contain one or more wildcard characters (*)
* that will allow wildcard matching when intersecting with
* another TokenSet.
*
* @param {string} str - The string to create a TokenSet from.
* @returns {lunr.TokenSet}
*/
lunr.TokenSet.fromString = function (str) {
var node = new lunr.TokenSet,
root = node,
wildcardFound = false
/*
* Iterates through all characters within the passed string
* appending a node for each character.
*
* As soon as a wildcard character is found then a self
* referencing edge is introduced to continually match
* any number of any characters.
*/
for (var i = 0, len = str.length; i < len; i++) {
var char = str[i],
final = (i == len - 1)
if (char == "*") {
wildcardFound = true
node.edges[char] = node
node.final = final
} else {
var next = new lunr.TokenSet
next.final = final
node.edges[char] = next
node = next
// TODO: is this needed anymore?
if (wildcardFound) {
node.edges["*"] = root
}
}
}
return root
}
/**
* Converts this TokenSet into an array of strings
* contained within the TokenSet.
*
* @returns {string[]}
*/
lunr.TokenSet.prototype.toArray = function () {
var words = []
var stack = [{
prefix: "",
node: this
}]
while (stack.length) {
var frame = stack.pop(),
edges = Object.keys(frame.node.edges),
len = edges.length
if (frame.node.final) {
words.push(frame.prefix)
}
for (var i = 0; i < len; i++) {
var edge = edges[i]
stack.push({
prefix: frame.prefix.concat(edge),
node: frame.node.edges[edge]
})
}
}
return words
}
/**
* Generates a string representation of a TokenSet.
*
* This is intended to allow TokenSets to be used as keys
* in objects, largely to aid the construction and minimisation
* of a TokenSet. As such it is not designed to be a human
* friendly representation of the TokenSet.
*
* @returns {string}
*/
lunr.TokenSet.prototype.toString = function () {
// NOTE: Using Object.keys here as this.edges is very likely
// to enter 'hash-mode' with many keys being added
//
// avoiding a for-in loop here as it leads to the function
// being de-optimised (at least in V8). From some simple
// benchmarks the performance is comparable, but allowing
// V8 to optimize may mean easy performance wins in the future.
if (this._str) {
return this._str
}
var str = this.final ? '1' : '0',
labels = Object.keys(this.edges).sort(),
len = labels.length
for (var i = 0; i < len; i++) {
var label = labels[i],
node = this.edges[label]
str = str + label + node.id
}
return str
}
/**
* Returns a new TokenSet that is the intersection of
* this TokenSet and the passed TokenSet.
*
* This intersection will take into account any wildcards
* contained within the TokenSet.
*
* @param {lunr.TokenSet} b - An other TokenSet to intersect with.
* @returns {lunr.TokenSet}
*/
lunr.TokenSet.prototype.intersect = function (b) {
var output = new lunr.TokenSet,
frame = undefined
var stack = [{
qNode: b,
output: output,
node: this
}]
while (stack.length) {
frame = stack.pop()
// NOTE: As with the #toString method, we are using
// Object.keys and a for loop instead of a for-in loop
// as both of these objects enter 'hash' mode, causing
// the function to be de-optimised in V8
var qEdges = Object.keys(frame.qNode.edges),
qLen = qEdges.length,
nEdges = Object.keys(frame.node.edges),
nLen = nEdges.length
for (var q = 0; q < qLen; q++) {
var qEdge = qEdges[q]
for (var n = 0; n < nLen; n++) {
var nEdge = nEdges[n]
if (nEdge == qEdge || qEdge == '*') {
var node = frame.node.edges[nEdge],
qNode = frame.qNode.edges[qEdge],
final = node.final && qNode.final,
next = undefined
if (nEdge in frame.output.edges) {
// an edge already exists for this character
// no need to create a new node, just set the finality
// bit unless this node is already final
next = frame.output.edges[nEdge]
next.final = next.final || final
} else {
// no edge exists yet, must create one
// set the finality bit and insert it
// into the output
next = new lunr.TokenSet
next.final = final
frame.output.edges[nEdge] = next
}
stack.push({
qNode: qNode,
output: next,
node: node
})
}
}
}
}
return output
}
lunr.TokenSet.Builder = function () {
this.previousWord = ""
this.root = new lunr.TokenSet
this.uncheckedNodes = []
this.minimizedNodes = {}
}
lunr.TokenSet.Builder.prototype.insert = function (word) {
var node,
commonPrefix = 0
if (word < this.previousWord) {
throw new Error ("Out of order word insertion")
}
for (var i = 0; i < word.length && i < this.previousWord.length; i++) {
if (word[i] != this.previousWord[i]) break
commonPrefix++
}
this.minimize(commonPrefix)
if (this.uncheckedNodes.length == 0) {
node = this.root
} else {
node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child
}
for (var i = commonPrefix; i < word.length; i++) {
var nextNode = new lunr.TokenSet,
char = word[i]
node.edges[char] = nextNode
this.uncheckedNodes.push({
parent: node,
char: char,
child: nextNode
})
node = nextNode
}
node.final = true
this.previousWord = word
}
lunr.TokenSet.Builder.prototype.finish = function () {
this.minimize(0)
}
lunr.TokenSet.Builder.prototype.minimize = function (downTo) {
for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {
var node = this.uncheckedNodes[i],
childKey = node.child.toString()
if (childKey in this.minimizedNodes) {
node.parent.edges[node.char] = this.minimizedNodes[childKey]
} else {
// Cache the key for this node since
// we know it can't change anymore
node.child._str = childKey
this.minimizedNodes[childKey] = node.child
}
this.uncheckedNodes.pop()
}
}
/*!
* lunr.Index
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* An index contains the built index of all documents and provides a query interface
* to the index.
*
* Usually instances of lunr.Index will not be created using this constructor, instead
* lunr.Builder should be used to construct new indexes, or lunr.Index.load should be
* used to load previously built and serialized indexes.
*
* @constructor
* @param {Object} attrs - The attributes of the built search index.
* @param {Object} attrs.invertedIndex - An index of term/field to document reference.
* @param {Object<string, lunr.Vector>} attrs.documentVectors - Document vectors keyed by document reference.
* @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.
* @param {string[]} attrs.fields - The names of indexed document fields.
* @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.
*/
lunr.Index = function (attrs) {
this.invertedIndex = attrs.invertedIndex
this.fieldVectors = attrs.fieldVectors
this.tokenSet = attrs.tokenSet
this.fields = attrs.fields
this.pipeline = attrs.pipeline
}
/**
* A result contains details of a document matching a search query.
* @typedef {Object} lunr.Index~Result
* @property {string} ref - The reference of the document this result represents.
* @property {number} score - A number between 0 and 1 representing how similar this document is to the query.
* @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.
*/
/**
* Although lunr provides the ability to create queries using lunr.Query, it also provides a simple
* query language which itself is parsed into an instance of lunr.Query.
*
* For programmatically building queries it is advised to directly use lunr.Query, the query language
* is best used for human entered text rather than program generated text.
*
* At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported
* and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'
* or 'world', though those that contain both will rank higher in the results.
*
* Wildcards can be included in terms to match one or more unspecified characters, these wildcards can
* be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding
* wildcards will increase the number of documents that will be found but can also have a negative
* impact on query performance, especially with wildcards at the beginning of a term.
*
* Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term
* hello in the title field will match this query. Using a field not present in the index will lead
* to an error being thrown.
*
* Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term
* boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported
* to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.
* Avoid large values for edit distance to improve query performance.
*
* To escape special characters the backslash character '\' can be used, this allows searches to include
* characters that would normally be considered modifiers, e.g. `foo\~2` will search for a term "foo~2" instead
* of attempting to apply a boost of 2 to the search term "foo".
*
* @typedef {string} lunr.Index~QueryString
* @example <caption>Simple single term query</caption>
* hello
* @example <caption>Multiple term query</caption>
* hello world
* @example <caption>term scoped to a field</caption>
* title:hello
* @example <caption>term with a boost of 10</caption>
* hello^10
* @example <caption>term with an edit distance of 2</caption>
* hello~2
*/
/**
* Performs a search against the index using lunr query syntax.
*
* Results will be returned sorted by their score, the most relevant results
* will be returned first.
*
* For more programmatic querying use lunr.Index#query.
*
* @param {lunr.Index~QueryString} queryString - A string containing a lunr query.
* @throws {lunr.QueryParseError} If the passed query string cannot be parsed.
* @returns {lunr.Index~Result[]}
*/
lunr.Index.prototype.search = function (queryString) {
return this.query(function (query) {
var parser = new lunr.QueryParser(queryString, query)
parser.parse()
})
}
/**
* A query builder callback provides a query object to be used to express
* the query to perform on the index.
*
* @callback lunr.Index~queryBuilder
* @param {lunr.Query} query - The query object to build up.
* @this lunr.Query
*/
/**
* Performs a query against the index using the yielded lunr.Query object.
*
* If performing programmatic queries against the index, this method is preferred
* over lunr.Index#search so as to avoid the additional query parsing overhead.
*
* A query object is yielded to the supplied function which should be used to
* express the query to be run against the index.
*
* Note that although this function takes a callback parameter it is _not_ an
* asynchronous operation, the callback is just yielded a query object to be
* customized.
*
* @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.
* @returns {lunr.Index~Result[]}
*/
lunr.Index.prototype.query = function (fn) {
// for each query clause
// * process terms
// * expand terms from token set
// * find matching documents and metadata
// * get document vectors
// * score documents
var query = new lunr.Query(this.fields),
matchingFields = Object.create(null),
queryVectors = Object.create(null),
termFieldCache = Object.create(null)
fn.call(query, query)
for (var i = 0; i < query.clauses.length; i++) {
/*
* Unless the pipeline has been disabled for this term, which is
* the case for terms with wildcards, we need to pass the clause
* term through the search pipeline. A pipeline returns an array
* of processed terms. Pipeline functions may expand the passed
* term, which means we may end up performing multiple index lookups
* for a single query term.
*/
var clause = query.clauses[i],
terms = null
if (clause.usePipeline) {
terms = this.pipeline.runString(clause.term)
} else {
terms = [clause.term]
}
for (var m = 0; m < terms.length; m++) {
var term = terms[m]
/*
* Each term returned from the pipeline needs to use the same query
* clause object, e.g. the same boost and or edit distance. The
* simplest way to do this is to re-use the clause object but mutate
* its term property.
*/
clause.term = term
/*
* From the term in the clause we create a token set which will then
* be used to intersect the indexes token set to get a list of terms
* to lookup in the inverted index
*/
var termTokenSet = lunr.TokenSet.fromClause(clause),
expandedTerms = this.tokenSet.intersect(termTokenSet).toArray()
for (var j = 0; j < expandedTerms.length; j++) {
/*
* For each term get the posting and termIndex, this is required for
* building the query vector.
*/
var expandedTerm = expandedTerms[j],
posting = this.invertedIndex[expandedTerm],
termIndex = posting._index
for (var k = 0; k < clause.fields.length; k++) {
/*
* For each field that this query term is scoped by (by default
* all fields are in scope) we need to get all the document refs
* that have this term in that field.
*
* The posting is the entry in the invertedIndex for the matching
* term from above.
*/
var field = clause.fields[k],
fieldPosting = posting[field],
matchingDocumentRefs = Object.keys(fieldPosting),
termField = expandedTerm + "/" + field
/*
* To support field level boosts a query vector is created per
* field. This vector is populated using the termIndex found for
* the term and a unit value with the appropriate boost applied.
*
* If the query vector for this field does not exist yet it needs
* to be created.
*/
if (queryVectors[field] === undefined) {
queryVectors[field] = new lunr.Vector
}
/*
* Using upsert because there could already be an entry in the vector
* for the term we are working with. In that case we just add the scores
* together.
*/
queryVectors[field].upsert(termIndex, 1 * clause.boost, function (a, b) { return a + b })
/**
* If we've already seen this term, field combo then we've already collected
* the matching documents and metadata, no need to go through all that again
*/
if (termFieldCache[termField]) {
continue
}
for (var l = 0; l < matchingDocumentRefs.length; l++) {
/*
* All metadata for this term/field/document triple
* are then extracted and collected into an instance
* of lunr.MatchData ready to be returned in the query
* results
*/
var matchingDocumentRef = matchingDocumentRefs[l],
matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field),
metadata = fieldPosting[matchingDocumentRef],
fieldMatch
if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {
matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata)
} else {
fieldMatch.add(expandedTerm, field, metadata)
}
}
termFieldCache[termField] = true
}
}
}
}
var matchingFieldRefs = Object.keys(matchingFields),
results = [],
matches = Object.create(null)
for (var i = 0; i < matchingFieldRefs.length; i++) {
/*
* Currently we have document fields that match the query, but we
* need to return documents. The matchData and scores are combined
* from multiple fields belonging to the same document.
*
* Scores are calculated by field, using the query vectors created
* above, and combined into a final document score using addition.
*/
var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),
docRef = fieldRef.docRef,
fieldVector = this.fieldVectors[fieldRef],
score = queryVectors[fieldRef.fieldName].similarity(fieldVector),
docMatch
if ((docMatch = matches[docRef]) !== undefined) {
docMatch.score += score
docMatch.matchData.combine(matchingFields[fieldRef])
} else {
var match = {
ref: docRef,
score: score,
matchData: matchingFields[fieldRef]
}
matches[docRef] = match
results.push(match)
}
}
/*
* Sort the results objects by score, highest first.
*/
return results.sort(function (a, b) {
return b.score - a.score
})
}
/**
* Prepares the index for JSON serialization.
*
* The schema for this JSON blob will be described in a
* separate JSON schema file.
*
* @returns {Object}
*/
lunr.Index.prototype.toJSON = function () {
var invertedIndex = Object.keys(this.invertedIndex)
.sort()
.map(function (term) {
return [term, this.invertedIndex[term]]
}, this)
var fieldVectors = Object.keys(this.fieldVectors)
.map(function (ref) {
return [ref, this.fieldVectors[ref].toJSON()]
}, this)
return {
version: lunr.version,
fields: this.fields,
fieldVectors: fieldVectors,
invertedIndex: invertedIndex,
pipeline: this.pipeline.toJSON()
}
}
/**
* Loads a previously serialized lunr.Index
*
* @param {Object} serializedIndex - A previously serialized lunr.Index
* @returns {lunr.Index}
*/
lunr.Index.load = function (serializedIndex) {
var attrs = {},
fieldVectors = {},
serializedVectors = serializedIndex.fieldVectors,
invertedIndex = {},
serializedInvertedIndex = serializedIndex.invertedIndex,
tokenSetBuilder = new lunr.TokenSet.Builder,
pipeline = lunr.Pipeline.load(serializedIndex.pipeline)
if (serializedIndex.version != lunr.version) {
lunr.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr.version + "' does not match serialized index '" + serializedIndex.version + "'")
}
for (var i = 0; i < serializedVectors.length; i++) {
var tuple = serializedVectors[i],
ref = tuple[0],
elements = tuple[1]
fieldVectors[ref] = new lunr.Vector(elements)
}
for (var i = 0; i < serializedInvertedIndex.length; i++) {
var tuple = serializedInvertedIndex[i],
term = tuple[0],
posting = tuple[1]
tokenSetBuilder.insert(term)
invertedIndex[term] = posting
}
tokenSetBuilder.finish()
attrs.fields = serializedIndex.fields
attrs.fieldVectors = fieldVectors
attrs.invertedIndex = invertedIndex
attrs.tokenSet = tokenSetBuilder.root
attrs.pipeline = pipeline
return new lunr.Index(attrs)
}
/*!
* lunr.Builder
* Copyright (C) 2018 Oliver Nightingale
*/
/**
* lunr.Builder performs indexing on a set of documents and
* returns instances of lunr.Index ready for querying.
*
* All configuration of the index is done via the builder, the
* fields to index, the document reference, the text processing
* pipeline and document scoring parameters are all set on the
* builder before indexing.
*
* @constructor
* @property {string} _ref - Internal reference to the document reference field.
* @property {string[]} _fields - Internal reference to the document fields to index.
* @property {object} invertedIndex - The inverted index maps terms to document fields.
* @property {object} documentTermFrequencies - Keeps track of document term frequencies.
* @property {object} documentLengths - Keeps track of the length of documents added to the index.
* @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.
* @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.
* @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.
* @property {number} documentCount - Keeps track of the total number of documents indexed.
* @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.
* @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.
* @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.
* @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.
*/
lunr.Builder = function () {
this._ref = "id"
this._fields = []
this.invertedIndex = Object.create(null)
this.fieldTermFrequencies = {}
this.fieldLengths = {}
this.tokenizer = lunr.tokenizer
this.pipeline = new lunr.Pipeline
this.searchPipeline = new lunr.Pipeline
this.documentCount = 0
this._b = 0.75
this._k1 = 1.2
this.termIndex = 0
this.metadataWhitelist = []
}
/**
* Sets the document field used as the document reference. Every document must have this field.
* The type of this field in the document should be a string, if it is not a string it will be
* coerced into a string by calling toString.
*
* The default ref is 'id'.
*
* The ref should _not_ be changed during indexing, it should be set before any documents are
* added to the index. Changing it during indexing can lead to inconsistent results.
*
* @param {string} ref - The name of the reference field in the document.
*/
lunr.Builder.prototype.ref = function (ref) {
this._ref = ref
}
/**
* Adds a field to the list of document fields that will be indexed. Every document being
* indexed should have this field. Null values for this field in indexed documents will
* not cause errors but will limit the chance of that document being retrieved by searches.
*
* All fields should be added before adding documents to the index. Adding fields after
* a document has been indexed will have no effect on already indexed documents.
*
* @param {string} field - The name of a field to index in all documents.
*/
lunr.Builder.prototype.field = function (field) {
this._fields.push(field)
}
/**
* A parameter to tune the amount of field length normalisation that is applied when
* calculating relevance scores. A value of 0 will completely disable any normalisation
* and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b
* will be clamped to the range 0 - 1.
*
* @param {number} number - The value to set for this tuning parameter.
*/
lunr.Builder.prototype.b = function (number) {
if (number < 0) {
this._b = 0
} else if (number > 1) {
this._b = 1
} else {
this._b = number
}
}
/**
* A parameter that controls the speed at which a rise in term frequency results in term
* frequency saturation. The default value is 1.2. Setting this to a higher value will give
* slower saturation levels, a lower value will result in quicker saturation.
*
* @param {number} number - The value to set for this tuning parameter.
*/
lunr.Builder.prototype.k1 = function (number) {
this._k1 = number
}
/**
* Adds a document to the index.
*
* Before adding fields to the index the index should have been fully setup, with the document
* ref and all fields to index already having been specified.
*
* The document must have a field name as specified by the ref (by default this is 'id') and
* it should have all fields defined for indexing, though null or undefined values will not
* cause errors.
*
* @param {object} doc - The document to add to the index.
*/
lunr.Builder.prototype.add = function (doc) {
var docRef = doc[this._ref]
this.documentCount += 1
for (var i = 0; i < this._fields.length; i++) {
var fieldName = this._fields[i],
field = doc[fieldName],
tokens = this.tokenizer(field),
terms = this.pipeline.run(tokens),
fieldRef = new lunr.FieldRef (docRef, fieldName),
fieldTerms = Object.create(null)
this.fieldTermFrequencies[fieldRef] = fieldTerms
this.fieldLengths[fieldRef] = 0
// store the length of this field for this document
this.fieldLengths[fieldRef] += terms.length
// calculate term frequencies for this field
for (var j = 0; j < terms.length; j++) {
var term = terms[j]
if (fieldTerms[term] == undefined) {
fieldTerms[term] = 0
}
fieldTerms[term] += 1
// add to inverted index
// create an initial posting if one doesn't exist
if (this.invertedIndex[term] == undefined) {
var posting = Object.create(null)
posting["_index"] = this.termIndex
this.termIndex += 1
for (var k = 0; k < this._fields.length; k++) {
posting[this._fields[k]] = Object.create(null)
}
this.invertedIndex[term] = posting
}
// add an entry for this term/fieldName/docRef to the invertedIndex
if (this.invertedIndex[term][fieldName][docRef] == undefined) {
this.invertedIndex[term][fieldName][docRef] = Object.create(null)
}
// store all whitelisted metadata about this token in the
// inverted index
for (var l = 0; l < this.metadataWhitelist.length; l++) {
var metadataKey = this.metadataWhitelist[l],
metadata = term.metadata[metadataKey]
if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {
this.invertedIndex[term][fieldName][docRef][metadataKey] = []
}
this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata)
}
}
}
}
/**
* Calculates the average document length for this index
*
* @private
*/
lunr.Builder.prototype.calculateAverageFieldLengths = function () {
var fieldRefs = Object.keys(this.fieldLengths),
numberOfFields = fieldRefs.length,
accumulator = {},
documentsWithField = {}
for (var i = 0; i < numberOfFields; i++) {
var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),
field = fieldRef.fieldName
documentsWithField[field] || (documentsWithField[field] = 0)
documentsWithField[field] += 1
accumulator[field] || (accumulator[field] = 0)
accumulator[field] += this.fieldLengths[fieldRef]
}
for (var i = 0; i < this._fields.length; i++) {
var field = this._fields[i]
accumulator[field] = accumulator[field] / documentsWithField[field]
}
this.averageFieldLength = accumulator
}
/**
* Builds a vector space model of every document using lunr.Vector
*
* @private
*/
lunr.Builder.prototype.createFieldVectors = function () {
var fieldVectors = {},
fieldRefs = Object.keys(this.fieldTermFrequencies),
fieldRefsLength = fieldRefs.length,
termIdfCache = Object.create(null)
for (var i = 0; i < fieldRefsLength; i++) {
var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),
field = fieldRef.fieldName,
fieldLength = this.fieldLengths[fieldRef],
fieldVector = new lunr.Vector,
termFrequencies = this.fieldTermFrequencies[fieldRef],
terms = Object.keys(termFrequencies),
termsLength = terms.length
for (var j = 0; j < termsLength; j++) {
var term = terms[j],
tf = termFrequencies[term],
termIndex = this.invertedIndex[term]._index,
idf, score, scoreWithPrecision
if (termIdfCache[term] === undefined) {
idf = lunr.idf(this.invertedIndex[term], this.documentCount)
termIdfCache[term] = idf
} else {
idf = termIdfCache[term]
}
score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[field])) + tf)
scoreWithPrecision = Math.round(score * 1000) / 1000
// Converts 1.23456789 to 1.234.
// Reducing the precision so that the vectors take up less
// space when serialised. Doing it now so that they behave
// the same before and after serialisation. Also, this is
// the fastest approach to reducing a number's precision in
// JavaScript.
fieldVector.insert(termIndex, scoreWithPrecision)
}
fieldVectors[fieldRef] = fieldVector
}
this.fieldVectors = fieldVectors
}
/**
* Creates a token set of all tokens in the index using lunr.TokenSet
*
* @private
*/
lunr.Builder.prototype.createTokenSet = function () {
this.tokenSet = lunr.TokenSet.fromArray(
Object.keys(this.invertedIndex).sort()
)
}
/**
* Builds the index, creating an instance of lunr.Index.
*
* This completes the indexing process and should only be called
* once all documents have been added to the index.
*
* @returns {lunr.Index}
*/
lunr.Builder.prototype.build = function () {
this.calculateAverageFieldLengths()
this.createFieldVectors()
this.createTokenSet()
return new lunr.Index({
invertedIndex: this.invertedIndex,
fieldVectors: this.fieldVectors,
tokenSet: this.tokenSet,
fields: this._fields,
pipeline: this.searchPipeline
})
}
/**
* Applies a plugin to the index builder.
*
* A plugin is a function that is called with the index builder as its context.
* Plugins can be used to customise or extend the behaviour of the index
* in some way. A plugin is just a function, that encapsulated the custom
* behaviour that should be applied when building the index.
*
* The plugin function will be called with the index builder as its argument, additional
* arguments can also be passed when calling use. The function will be called
* with the index builder as its context.
*
* @param {Function} plugin The plugin to apply.
*/
lunr.Builder.prototype.use = function (fn) {
var args = Array.prototype.slice.call(arguments, 1)
args.unshift(this)
fn.apply(this, args)
}
/**
* Contains and collects metadata about a matching document.
* A single instance of lunr.MatchData is returned as part of every
* lunr.Index~Result.
*
* @constructor
* @param {string} term - The term this match data is associated with
* @param {string} field - The field in which the term was found
* @param {object} metadata - The metadata recorded about this term in this field
* @property {object} metadata - A cloned collection of metadata associated with this document.
* @see {@link lunr.Index~Result}
*/
lunr.MatchData = function (term, field, metadata) {
var clonedMetadata = Object.create(null),
metadataKeys = Object.keys(metadata)
// Cloning the metadata to prevent the original
// being mutated during match data combination.
// Metadata is kept in an array within the inverted
// index so cloning the data can be done with
// Array#slice
for (var i = 0; i < metadataKeys.length; i++) {
var key = metadataKeys[i]
clonedMetadata[key] = metadata[key].slice()
}
this.metadata = Object.create(null)
this.metadata[term] = Object.create(null)
this.metadata[term][field] = clonedMetadata
}
/**
* An instance of lunr.MatchData will be created for every term that matches a
* document. However only one instance is required in a lunr.Index~Result. This
* method combines metadata from another instance of lunr.MatchData with this
* objects metadata.
*
* @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.
* @see {@link lunr.Index~Result}
*/
lunr.MatchData.prototype.combine = function (otherMatchData) {
var terms = Object.keys(otherMatchData.metadata)
for (var i = 0; i < terms.length; i++) {
var term = terms[i],
fields = Object.keys(otherMatchData.metadata[term])
if (this.metadata[term] == undefined) {
this.metadata[term] = Object.create(null)
}
for (var j = 0; j < fields.length; j++) {
var field = fields[j],
keys = Object.keys(otherMatchData.metadata[term][field])
if (this.metadata[term][field] == undefined) {
this.metadata[term][field] = Object.create(null)
}
for (var k = 0; k < keys.length; k++) {
var key = keys[k]
if (this.metadata[term][field][key] == undefined) {
this.metadata[term][field][key] = otherMatchData.metadata[term][field][key]
} else {
this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key])
}
}
}
}
}
/**
* Add metadata for a term/field pair to this instance of match data.
*
* @param {string} term - The term this match data is associated with
* @param {string} field - The field in which the term was found
* @param {object} metadata - The metadata recorded about this term in this field
*/
lunr.MatchData.prototype.add = function (term, field, metadata) {
if (!(term in this.metadata)) {
this.metadata[term] = Object.create(null)
this.metadata[term][field] = metadata
return
}
if (!(field in this.metadata[term])) {
this.metadata[term][field] = metadata
return
}
var metadataKeys = Object.keys(metadata)
for (var i = 0; i < metadataKeys.length; i++) {
var key = metadataKeys[i]
if (key in this.metadata[term][field]) {
this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key])
} else {
this.metadata[term][field][key] = metadata[key]
}
}
}
/**
* A lunr.Query provides a programmatic way of defining queries to be performed
* against a {@link lunr.Index}.
*
* Prefer constructing a lunr.Query using the {@link lunr.Index#query} method
* so the query object is pre-initialized with the right index fields.
*
* @constructor
* @property {lunr.Query~Clause[]} clauses - An array of query clauses.
* @property {string[]} allFields - An array of all available fields in a lunr.Index.
*/
lunr.Query = function (allFields) {
this.clauses = []
this.allFields = allFields
}
/**
* Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.
*
* This allows wildcards to be added to the beginning and end of a term without having to manually do any string
* concatenation.
*
* The wildcard constants can be bitwise combined to select both leading and trailing wildcards.
*
* @constant
* @default
* @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour
* @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists
* @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists
* @see lunr.Query~Clause
* @see lunr.Query#clause
* @see lunr.Query#term
* @example <caption>query term with trailing wildcard</caption>
* query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })
* @example <caption>query term with leading and trailing wildcard</caption>
* query.term('foo', {
* wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING
* })
*/
lunr.Query.wildcard = new String ("*")
lunr.Query.wildcard.NONE = 0
lunr.Query.wildcard.LEADING = 1
lunr.Query.wildcard.TRAILING = 2
/**
* A single clause in a {@link lunr.Query} contains a term and details on how to
* match that term against a {@link lunr.Index}.
*
* @typedef {Object} lunr.Query~Clause
* @property {string[]} fields - The fields in an index this clause should be matched against.
* @property {number} [boost=1] - Any boost that should be applied when matching this clause.
* @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.
* @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.
* @property {number} [wildcard=0] - Whether the term should have wildcards appended or prepended.
*/
/**
* Adds a {@link lunr.Query~Clause} to this query.
*
* Unless the clause contains the fields to be matched all fields will be matched. In addition
* a default boost of 1 is applied to the clause.
*
* @param {lunr.Query~Clause} clause - The clause to add to this query.
* @see lunr.Query~Clause
* @returns {lunr.Query}
*/
lunr.Query.prototype.clause = function (clause) {
if (!('fields' in clause)) {
clause.fields = this.allFields
}
if (!('boost' in clause)) {
clause.boost = 1
}
if (!('usePipeline' in clause)) {
clause.usePipeline = true
}
if (!('wildcard' in clause)) {
clause.wildcard = lunr.Query.wildcard.NONE
}
if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) {
clause.term = "*" + clause.term
}
if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) {
clause.term = "" + clause.term + "*"
}
this.clauses.push(clause)
return this
}
/**
* Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}
* to the list of clauses that make up this query.
*
* @param {string} term - The term to add to the query.
* @param {Object} [options] - Any additional properties to add to the query clause.
* @returns {lunr.Query}
* @see lunr.Query#clause
* @see lunr.Query~Clause
* @example <caption>adding a single term to a query</caption>
* query.term("foo")
* @example <caption>adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard</caption>
* query.term("foo", {
* fields: ["title"],
* boost: 10,
* wildcard: lunr.Query.wildcard.TRAILING
* })
*/
lunr.Query.prototype.term = function (term, options) {
var clause = options || {}
clause.term = term
this.clause(clause)
return this
}
lunr.QueryParseError = function (message, start, end) {
this.name = "QueryParseError"
this.message = message
this.start = start
this.end = end
}
lunr.QueryParseError.prototype = new Error
lunr.QueryLexer = function (str) {
this.lexemes = []
this.str = str
this.length = str.length
this.pos = 0
this.start = 0
this.escapeCharPositions = []
}
lunr.QueryLexer.prototype.run = function () {
var state = lunr.QueryLexer.lexText
while (state) {
state = state(this)
}
}
lunr.QueryLexer.prototype.sliceString = function () {
var subSlices = [],
sliceStart = this.start,
sliceEnd = this.pos
for (var i = 0; i < this.escapeCharPositions.length; i++) {
sliceEnd = this.escapeCharPositions[i]
subSlices.push(this.str.slice(sliceStart, sliceEnd))
sliceStart = sliceEnd + 1
}
subSlices.push(this.str.slice(sliceStart, this.pos))
this.escapeCharPositions.length = 0
return subSlices.join('')
}
lunr.QueryLexer.prototype.emit = function (type) {
this.lexemes.push({
type: type,
str: this.sliceString(),
start: this.start,
end: this.pos
})
this.start = this.pos
}
lunr.QueryLexer.prototype.escapeCharacter = function () {
this.escapeCharPositions.push(this.pos - 1)
this.pos += 1
}
lunr.QueryLexer.prototype.next = function () {
if (this.pos >= this.length) {
return lunr.QueryLexer.EOS
}
var char = this.str.charAt(this.pos)
this.pos += 1
return char
}
lunr.QueryLexer.prototype.width = function () {
return this.pos - this.start
}
lunr.QueryLexer.prototype.ignore = function () {
if (this.start == this.pos) {
this.pos += 1
}
this.start = this.pos
}
lunr.QueryLexer.prototype.backup = function () {
this.pos -= 1
}
lunr.QueryLexer.prototype.acceptDigitRun = function () {
var char, charCode
do {
char = this.next()
charCode = char.charCodeAt(0)
} while (charCode > 47 && charCode < 58)
if (char != lunr.QueryLexer.EOS) {
this.backup()
}
}
lunr.QueryLexer.prototype.more = function () {
return this.pos < this.length
}
lunr.QueryLexer.EOS = 'EOS'
lunr.QueryLexer.FIELD = 'FIELD'
lunr.QueryLexer.TERM = 'TERM'
lunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'
lunr.QueryLexer.BOOST = 'BOOST'
lunr.QueryLexer.lexField = function (lexer) {
lexer.backup()
lexer.emit(lunr.QueryLexer.FIELD)
lexer.ignore()
return lunr.QueryLexer.lexText
}
lunr.QueryLexer.lexTerm = function (lexer) {
if (lexer.width() > 1) {
lexer.backup()
lexer.emit(lunr.QueryLexer.TERM)
}
lexer.ignore()
if (lexer.more()) {
return lunr.QueryLexer.lexText
}
}
lunr.QueryLexer.lexEditDistance = function (lexer) {
lexer.ignore()
lexer.acceptDigitRun()
lexer.emit(lunr.QueryLexer.EDIT_DISTANCE)
return lunr.QueryLexer.lexText
}
lunr.QueryLexer.lexBoost = function (lexer) {
lexer.ignore()
lexer.acceptDigitRun()
lexer.emit(lunr.QueryLexer.BOOST)
return lunr.QueryLexer.lexText
}
lunr.QueryLexer.lexEOS = function (lexer) {
if (lexer.width() > 0) {
lexer.emit(lunr.QueryLexer.TERM)
}
}
// This matches the separator used when tokenising fields
// within a document. These should match otherwise it is
// not possible to search for some tokens within a document.
//
// It is possible for the user to change the separator on the
// tokenizer so it _might_ clash with any other of the special
// characters already used within the search string, e.g. :.
//
// This means that it is possible to change the separator in
// such a way that makes some words unsearchable using a search
// string.
lunr.QueryLexer.termSeparator = lunr.tokenizer.separator
lunr.QueryLexer.lexText = function (lexer) {
while (true) {
var char = lexer.next()
if (char == lunr.QueryLexer.EOS) {
return lunr.QueryLexer.lexEOS
}
// Escape character is '\'
if (char.charCodeAt(0) == 92) {
lexer.escapeCharacter()
continue
}
if (char == ":") {
return lunr.QueryLexer.lexField
}
if (char == "~") {
lexer.backup()
if (lexer.width() > 0) {
lexer.emit(lunr.QueryLexer.TERM)
}
return lunr.QueryLexer.lexEditDistance
}
if (char == "^") {
lexer.backup()
if (lexer.width() > 0) {
lexer.emit(lunr.QueryLexer.TERM)
}
return lunr.QueryLexer.lexBoost
}
if (char.match(lunr.QueryLexer.termSeparator)) {
return lunr.QueryLexer.lexTerm
}
}
}
lunr.QueryParser = function (str, query) {
this.lexer = new lunr.QueryLexer (str)
this.query = query
this.currentClause = {}
this.lexemeIdx = 0
}
lunr.QueryParser.prototype.parse = function () {
this.lexer.run()
this.lexemes = this.lexer.lexemes
var state = lunr.QueryParser.parseFieldOrTerm
while (state) {
state = state(this)
}
return this.query
}
lunr.QueryParser.prototype.peekLexeme = function () {
return this.lexemes[this.lexemeIdx]
}
lunr.QueryParser.prototype.consumeLexeme = function () {
var lexeme = this.peekLexeme()
this.lexemeIdx += 1
return lexeme
}
lunr.QueryParser.prototype.nextClause = function () {
var completedClause = this.currentClause
this.query.clause(completedClause)
this.currentClause = {}
}
lunr.QueryParser.parseFieldOrTerm = function (parser) {
var lexeme = parser.peekLexeme()
if (lexeme == undefined) {
return
}
switch (lexeme.type) {
case lunr.QueryLexer.FIELD:
return lunr.QueryParser.parseField
case lunr.QueryLexer.TERM:
return lunr.QueryParser.parseTerm
default:
var errorMessage = "expected either a field or a term, found " + lexeme.type
if (lexeme.str.length >= 1) {
errorMessage += " with value '" + lexeme.str + "'"
}
throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)
}
}
lunr.QueryParser.parseField = function (parser) {
var lexeme = parser.consumeLexeme()
if (lexeme == undefined) {
return
}
if (parser.query.allFields.indexOf(lexeme.str) == -1) {
var possibleFields = parser.query.allFields.map(function (f) { return "'" + f + "'" }).join(', '),
errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields
throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)
}
parser.currentClause.fields = [lexeme.str]
var nextLexeme = parser.peekLexeme()
if (nextLexeme == undefined) {
var errorMessage = "expecting term, found nothing"
throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)
}
switch (nextLexeme.type) {
case lunr.QueryLexer.TERM:
return lunr.QueryParser.parseTerm
default:
var errorMessage = "expecting term, found '" + nextLexeme.type + "'"
throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)
}
}
lunr.QueryParser.parseTerm = function (parser) {
var lexeme = parser.consumeLexeme()
if (lexeme == undefined) {
return
}
parser.currentClause.term = lexeme.str.toLowerCase()
if (lexeme.str.indexOf("*") != -1) {
parser.currentClause.usePipeline = false
}
var nextLexeme = parser.peekLexeme()
if (nextLexeme == undefined) {
parser.nextClause()
return
}
switch (nextLexeme.type) {
case lunr.QueryLexer.TERM:
parser.nextClause()
return lunr.QueryParser.parseTerm
case lunr.QueryLexer.FIELD:
parser.nextClause()
return lunr.QueryParser.parseField
case lunr.QueryLexer.EDIT_DISTANCE:
return lunr.QueryParser.parseEditDistance
case lunr.QueryLexer.BOOST:
return lunr.QueryParser.parseBoost
default:
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'"
throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)
}
}
lunr.QueryParser.parseEditDistance = function (parser) {
var lexeme = parser.consumeLexeme()
if (lexeme == undefined) {
return
}
var editDistance = parseInt(lexeme.str, 10)
if (isNaN(editDistance)) {
var errorMessage = "edit distance must be numeric"
throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)
}
parser.currentClause.editDistance = editDistance
var nextLexeme = parser.peekLexeme()
if (nextLexeme == undefined) {
parser.nextClause()
return
}
switch (nextLexeme.type) {
case lunr.QueryLexer.TERM:
parser.nextClause()
return lunr.QueryParser.parseTerm
case lunr.QueryLexer.FIELD:
parser.nextClause()
return lunr.QueryParser.parseField
case lunr.QueryLexer.EDIT_DISTANCE:
return lunr.QueryParser.parseEditDistance
case lunr.QueryLexer.BOOST:
return lunr.QueryParser.parseBoost
default:
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'"
throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)
}
}
lunr.QueryParser.parseBoost = function (parser) {
var lexeme = parser.consumeLexeme()
if (lexeme == undefined) {
return
}
var boost = parseInt(lexeme.str, 10)
if (isNaN(boost)) {
var errorMessage = "boost must be numeric"
throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)
}
parser.currentClause.boost = boost
var nextLexeme = parser.peekLexeme()
if (nextLexeme == undefined) {
parser.nextClause()
return
}
switch (nextLexeme.type) {
case lunr.QueryLexer.TERM:
parser.nextClause()
return lunr.QueryParser.parseTerm
case lunr.QueryLexer.FIELD:
parser.nextClause()
return lunr.QueryParser.parseField
case lunr.QueryLexer.EDIT_DISTANCE:
return lunr.QueryParser.parseEditDistance
case lunr.QueryLexer.BOOST:
return lunr.QueryParser.parseBoost
default:
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'"
throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)
}
}
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like enviroments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
root.lunr = factory()
}
}(this, function () {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return lunr
}))
})();
function getSearchTermFromLocation() {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == 'q') {
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
}
}
}
function joinUrl (base, path) {
if (path.substring(0, 1) === "/") {
// path starts with `/`. Thus it is absolute.
return path;
}
if (base.substring(base.length-1) === "/") {
// base ends with `/`
return base + path;
}
return base + "/" + path;
}
function formatResult (location, title, summary) {
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ title + '</a></h3><p>' + summary +'</p></article>';
}
function displayResults (results) {
var search_results = document.getElementById("mkdocs-search-results");
while (search_results.firstChild) {
search_results.removeChild(search_results.firstChild);
}
if (results.length > 0){
for (var i=0; i < results.length; i++){
var result = results[i];
var html = formatResult(result.location, result.title, result.summary);
search_results.insertAdjacentHTML('beforeend', html);
}
} else {
search_results.insertAdjacentHTML('beforeend', "<p>No results found</p>");
}
}
function doSearch () {
var query = document.getElementById('mkdocs-search-query').value;
if (query.length > 2) {
if (!window.Worker) {
displayResults(search(query));
} else {
searchWorker.postMessage({query: query});
}
} else {
// Clear results for short queries
displayResults([]);
}
}
function initSearch () {
var search_input = document.getElementById('mkdocs-search-query');
if (search_input) {
search_input.addEventListener("keyup", doSearch);
}
var term = getSearchTermFromLocation();
if (term) {
search_input.value = term;
doSearch();
}
}
function onWorkerMessage (e) {
if (e.data.allowSearch) {
initSearch();
} else if (e.data.results) {
var results = e.data.results;
displayResults(results);
}
}
if (!window.Worker) {
console.log('Web Worker API not supported');
// load index in main thread
$.getScript(joinUrl(base_url, "search/worker.js")).done(function () {
console.log('Loaded worker');
init();
window.postMessage = function (msg) {
onWorkerMessage({data: msg});
};
}).fail(function (jqxhr, settings, exception) {
console.error('Could not load worker.js');
});
} else {
// Wrap search in a web worker
var searchWorker = new Worker(joinUrl(base_url, "search/worker.js"));
searchWorker.postMessage({init: true});
searchWorker.onmessage = onWorkerMessage;
}
{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Welcome to MkDocs For full documentation visit mkdocs.org . Commands mkdocs new [dir-name] - Create a new project. mkdocs serve - Start the live-reloading docs server. mkdocs build - Build the documentation site. mkdocs help - Print this help message. Project layout mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files.","title":"Welcome to MkDocs"},{"location":"#welcome-to-mkdocs","text":"For full documentation visit mkdocs.org .","title":"Welcome to MkDocs"},{"location":"#commands","text":"mkdocs new [dir-name] - Create a new project. mkdocs serve - Start the live-reloading docs server. mkdocs build - Build the documentation site. mkdocs help - Print this help message.","title":"Commands"},{"location":"#project-layout","text":"mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files.","title":"Project layout"},{"location":"docs/","text":"PaddleSlim PaddleSlim\u662fPaddlePaddle\u6846\u67b6\u7684\u4e00\u4e2a\u5b50\u6a21\u5757\uff0c\u4e3b\u8981\u7528\u4e8e\u538b\u7f29\u56fe\u50cf\u9886\u57df\u6a21\u578b\u3002\u5728PaddleSlim\u4e2d\uff0c\u4e0d\u4ec5\u5b9e\u73b0\u4e86\u76ee\u524d\u4e3b\u6d41\u7684\u7f51\u7edc\u526a\u679d\u3001\u91cf\u5316\u3001\u84b8\u998f\u4e09\u79cd\u538b\u7f29\u7b56\u7565\uff0c\u8fd8\u5b9e\u73b0\u4e86\u8d85\u53c2\u6570\u641c\u7d22\u548c\u5c0f\u6a21\u578b\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u529f\u80fd\u3002\u5728\u540e\u7eed\u7248\u672c\u4e2d\uff0c\u4f1a\u6dfb\u52a0\u66f4\u591a\u7684\u538b\u7f29\u7b56\u7565\uff0c\u4ee5\u53ca\u5b8c\u5584\u5bf9NLP\u9886\u57df\u6a21\u578b\u7684\u652f\u6301\u3002 \u529f\u80fd \u6a21\u578b\u526a\u88c1 \u652f\u6301\u901a\u9053\u5747\u5300\u6a21\u578b\u526a\u88c1\uff08uniform pruning) \u57fa\u4e8e\u654f\u611f\u5ea6\u7684\u6a21\u578b\u526a\u88c1 \u57fa\u4e8e\u8fdb\u5316\u7b97\u6cd5\u7684\u81ea\u52a8\u6a21\u578b\u526a\u88c1\u4e09\u79cd\u65b9\u5f0f \u91cf\u5316\u8bad\u7ec3 \u5728\u7ebf\u91cf\u5316\u8bad\u7ec3\uff08training aware\uff09 \u79bb\u7ebf\u91cf\u5316\uff08post training\uff09 \u652f\u6301\u5bf9\u6743\u91cd\u5168\u5c40\u91cf\u5316\u548cChannel-Wise\u91cf\u5316 \u84b8\u998f \u8f7b\u91cf\u795e\u7ecf\u7f51\u7edc\u7ed3\u6784\u81ea\u52a8\u641c\u7d22\uff08Light-NAS\uff09 \u652f\u6301\u57fa\u4e8e\u8fdb\u5316\u7b97\u6cd5\u7684\u8f7b\u91cf\u795e\u7ecf\u7f51\u7edc\u7ed3\u6784\u81ea\u52a8\u641c\u7d22\uff08Light-NAS\uff09 \u652f\u6301 FLOPS / \u786c\u4ef6\u5ef6\u65f6\u7ea6\u675f \u652f\u6301\u591a\u5e73\u53f0\u6a21\u578b\u5ef6\u65f6\u8bc4\u4f30 \u5b89\u88c5 \u5b89\u88c5PaddleSlim\u524d\uff0c\u8bf7\u786e\u8ba4\u5df2\u6b63\u786e\u5b89\u88c5Paddle1.6\u7248\u672c\u6216\u66f4\u65b0\u7248\u672c\u3002Paddle\u5b89\u88c5\u8bf7\u53c2\u8003\uff1a Paddle\u5b89\u88c5\u6559\u7a0b \u3002 \u5b89\u88c5develop\u7248\u672c git clone https://github.com/PaddlePaddle/PaddleSlim.git cd PaddleSlim python setup.py install \u5b89\u88c5\u5b98\u65b9\u53d1\u5e03\u7684\u6700\u65b0\u7248\u672c pip install paddleslim -i https://pypi.org/simple \u5b89\u88c5\u5386\u53f2\u7248\u672c \u8bf7\u70b9\u51fb pypi.org \u67e5\u770b\u53ef\u5b89\u88c5\u5386\u53f2\u7248\u672c\u3002 \u4f7f\u7528 API\u6587\u6863 \uff1aAPI\u4f7f\u7528\u4ecb\u7ecd\uff0c\u5305\u62ec \u84b8\u998f \u3001 \u526a\u88c1 \u3001 \u91cf\u5316 \u548c \u6a21\u578b\u7ed3\u6784\u641c\u7d22 \u3002 \u793a\u4f8b \uff1a\u57fa\u4e8emnist\u548ccifar10\u7b49\u7b80\u5355\u5206\u7c7b\u4efb\u52a1\u7684\u6a21\u578b\u538b\u7f29\u793a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8be5\u90e8\u5206\u5feb\u901f\u4f53\u9a8c\u548c\u4e86\u89e3PaddleSlim\u7684\u529f\u80fd\u3002 \u5b9e\u8df5\u6559\u7a0b \uff1a\u7ecf\u5178\u6a21\u578b\u7684\u5206\u6790\u548c\u538b\u7f29\u5b9e\u9a8c\u6559\u7a0b\u3002 \u6a21\u578b\u5e93 \uff1a\u7ecf\u8fc7\u538b\u7f29\u7684\u5206\u7c7b\u3001\u68c0\u6d4b\u3001\u8bed\u4e49\u5206\u5272\u6a21\u578b\uff0c\u5305\u62ec\u6743\u91cd\u6587\u4ef6\u3001\u7f51\u7edc\u7ed3\u6784\u6587\u4ef6\u548c\u6027\u80fd\u6570\u636e\u3002 Paddle\u68c0\u6d4b\u5e93 \uff1a\u4ecb\u7ecd\u5982\u4f55\u5728\u68c0\u6d4b\u5e93\u4e2d\u4f7f\u7528PaddleSlim\u3002 Paddle\u5206\u5272\u5e93 \uff1a\u4ecb\u7ecd\u5982\u4f55\u5728\u5206\u5272\u5e93\u4e2d\u4f7f\u7528PaddleSlim\u3002 PaddleLite \uff1a\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u9884\u6d4b\u5e93PaddleLite\u90e8\u7f72PaddleSlim\u4ea7\u51fa\u7684\u6a21\u578b\u3002 \u8d21\u732e\u4e0e\u53cd\u9988","title":"PaddleSlim"},{"location":"docs/#paddleslim","text":"PaddleSlim\u662fPaddlePaddle\u6846\u67b6\u7684\u4e00\u4e2a\u5b50\u6a21\u5757\uff0c\u4e3b\u8981\u7528\u4e8e\u538b\u7f29\u56fe\u50cf\u9886\u57df\u6a21\u578b\u3002\u5728PaddleSlim\u4e2d\uff0c\u4e0d\u4ec5\u5b9e\u73b0\u4e86\u76ee\u524d\u4e3b\u6d41\u7684\u7f51\u7edc\u526a\u679d\u3001\u91cf\u5316\u3001\u84b8\u998f\u4e09\u79cd\u538b\u7f29\u7b56\u7565\uff0c\u8fd8\u5b9e\u73b0\u4e86\u8d85\u53c2\u6570\u641c\u7d22\u548c\u5c0f\u6a21\u578b\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u529f\u80fd\u3002\u5728\u540e\u7eed\u7248\u672c\u4e2d\uff0c\u4f1a\u6dfb\u52a0\u66f4\u591a\u7684\u538b\u7f29\u7b56\u7565\uff0c\u4ee5\u53ca\u5b8c\u5584\u5bf9NLP\u9886\u57df\u6a21\u578b\u7684\u652f\u6301\u3002","title":"PaddleSlim"},{"location":"docs/#_1","text":"\u6a21\u578b\u526a\u88c1 \u652f\u6301\u901a\u9053\u5747\u5300\u6a21\u578b\u526a\u88c1\uff08uniform pruning) \u57fa\u4e8e\u654f\u611f\u5ea6\u7684\u6a21\u578b\u526a\u88c1 \u57fa\u4e8e\u8fdb\u5316\u7b97\u6cd5\u7684\u81ea\u52a8\u6a21\u578b\u526a\u88c1\u4e09\u79cd\u65b9\u5f0f \u91cf\u5316\u8bad\u7ec3 \u5728\u7ebf\u91cf\u5316\u8bad\u7ec3\uff08training aware\uff09 \u79bb\u7ebf\u91cf\u5316\uff08post training\uff09 \u652f\u6301\u5bf9\u6743\u91cd\u5168\u5c40\u91cf\u5316\u548cChannel-Wise\u91cf\u5316 \u84b8\u998f \u8f7b\u91cf\u795e\u7ecf\u7f51\u7edc\u7ed3\u6784\u81ea\u52a8\u641c\u7d22\uff08Light-NAS\uff09 \u652f\u6301\u57fa\u4e8e\u8fdb\u5316\u7b97\u6cd5\u7684\u8f7b\u91cf\u795e\u7ecf\u7f51\u7edc\u7ed3\u6784\u81ea\u52a8\u641c\u7d22\uff08Light-NAS\uff09 \u652f\u6301 FLOPS / \u786c\u4ef6\u5ef6\u65f6\u7ea6\u675f \u652f\u6301\u591a\u5e73\u53f0\u6a21\u578b\u5ef6\u65f6\u8bc4\u4f30","title":"\u529f\u80fd"},{"location":"docs/#_2","text":"\u5b89\u88c5PaddleSlim\u524d\uff0c\u8bf7\u786e\u8ba4\u5df2\u6b63\u786e\u5b89\u88c5Paddle1.6\u7248\u672c\u6216\u66f4\u65b0\u7248\u672c\u3002Paddle\u5b89\u88c5\u8bf7\u53c2\u8003\uff1a Paddle\u5b89\u88c5\u6559\u7a0b \u3002 \u5b89\u88c5develop\u7248\u672c git clone https://github.com/PaddlePaddle/PaddleSlim.git cd PaddleSlim python setup.py install \u5b89\u88c5\u5b98\u65b9\u53d1\u5e03\u7684\u6700\u65b0\u7248\u672c pip install paddleslim -i https://pypi.org/simple \u5b89\u88c5\u5386\u53f2\u7248\u672c \u8bf7\u70b9\u51fb pypi.org \u67e5\u770b\u53ef\u5b89\u88c5\u5386\u53f2\u7248\u672c\u3002","title":"\u5b89\u88c5"},{"location":"docs/#_3","text":"API\u6587\u6863 \uff1aAPI\u4f7f\u7528\u4ecb\u7ecd\uff0c\u5305\u62ec \u84b8\u998f \u3001 \u526a\u88c1 \u3001 \u91cf\u5316 \u548c \u6a21\u578b\u7ed3\u6784\u641c\u7d22 \u3002 \u793a\u4f8b \uff1a\u57fa\u4e8emnist\u548ccifar10\u7b49\u7b80\u5355\u5206\u7c7b\u4efb\u52a1\u7684\u6a21\u578b\u538b\u7f29\u793a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8be5\u90e8\u5206\u5feb\u901f\u4f53\u9a8c\u548c\u4e86\u89e3PaddleSlim\u7684\u529f\u80fd\u3002 \u5b9e\u8df5\u6559\u7a0b \uff1a\u7ecf\u5178\u6a21\u578b\u7684\u5206\u6790\u548c\u538b\u7f29\u5b9e\u9a8c\u6559\u7a0b\u3002 \u6a21\u578b\u5e93 \uff1a\u7ecf\u8fc7\u538b\u7f29\u7684\u5206\u7c7b\u3001\u68c0\u6d4b\u3001\u8bed\u4e49\u5206\u5272\u6a21\u578b\uff0c\u5305\u62ec\u6743\u91cd\u6587\u4ef6\u3001\u7f51\u7edc\u7ed3\u6784\u6587\u4ef6\u548c\u6027\u80fd\u6570\u636e\u3002 Paddle\u68c0\u6d4b\u5e93 \uff1a\u4ecb\u7ecd\u5982\u4f55\u5728\u68c0\u6d4b\u5e93\u4e2d\u4f7f\u7528PaddleSlim\u3002 Paddle\u5206\u5272\u5e93 \uff1a\u4ecb\u7ecd\u5982\u4f55\u5728\u5206\u5272\u5e93\u4e2d\u4f7f\u7528PaddleSlim\u3002 PaddleLite \uff1a\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u9884\u6d4b\u5e93PaddleLite\u90e8\u7f72PaddleSlim\u4ea7\u51fa\u7684\u6a21\u578b\u3002","title":"\u4f7f\u7528"},{"location":"docs/#_4","text":"","title":"\u8d21\u732e\u4e0e\u53cd\u9988"},{"location":"docs/table_latency/","text":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868 \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7528\u4e8e\u5feb\u901f\u8bc4\u4f30\u4e00\u4e2a\u6a21\u578b\u5728\u7279\u5b9a\u786c\u4ef6\u73af\u5883\u548c\u63a8\u7406\u5f15\u64ce\u4e0a\u7684\u63a8\u7406\u901f\u5ea6\u3002 \u8be5\u6587\u6863\u4e3b\u8981\u7528\u4e8e\u5b9a\u4e49PaddleSlim\u652f\u6301\u7684\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7684\u683c\u5f0f\u3002 \u6982\u8ff0 \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4e2d\u5b58\u653e\u7740\u6240\u6709\u53ef\u80fd\u7684\u64cd\u4f5c\u5bf9\u5e94\u7684\u5ef6\u65f6\u4fe1\u606f\uff0c\u8be5\u8868\u4e2d\u7684\u4e00\u4e2a\u64cd\u4f5c\u5305\u62ec\u64cd\u4f5c\u7c7b\u578b\u548c\u64cd\u4f5c\u53c2\u6570\uff0c\u6bd4\u5982\uff1a\u64cd\u4f5c\u7c7b\u578b\u53ef\u4ee5\u662f conv2d \uff0c\u5bf9\u5e94\u7684\u64cd\u4f5c\u53c2\u6570\u6709\u8f93\u5165\u7279\u5f81\u56fe\u7684\u5927\u5c0f\u3001\u5377\u79ef\u6838\u4e2a\u6570\u3001\u5377\u79ef\u6838\u5927\u5c0f\u7b49\u3002 \u7ed9\u5b9a\u64cd\u4f5c\u7684\u5ef6\u65f6\u4f9d\u8d56\u4e8e\u786c\u4ef6\u73af\u5883\u548c\u63a8\u7406\u5f15\u64ce\u3002 \u6574\u4f53\u683c\u5f0f \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4ee5\u6587\u4ef6\u6216\u591a\u884c\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u4fdd\u5b58\u3002 \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7b2c\u4e00\u884c\u4fdd\u5b58\u7248\u672c\u4fe1\u606f\uff0c\u540e\u7eed\u6bcf\u884c\u4e3a\u4e00\u4e2a\u64cd\u4f5c\u548c\u5bf9\u5e94\u7684\u5ef6\u65f6\u4fe1\u606f\u3002 \u7248\u672c\u4fe1\u606f \u7248\u672c\u4fe1\u606f\u4ee5\u82f1\u6587\u5b57\u7b26\u9017\u53f7\u5206\u5272\uff0c\u5185\u5bb9\u4f9d\u6b21\u4e3a\u786c\u4ef6\u73af\u5883\u540d\u79f0\u3001\u63a8\u7406\u5f15\u64ce\u540d\u79f0\u548c\u65f6\u95f4\u6233\u3002 \u786c\u4ef6\u73af\u5883\u540d\u79f0\uff1a \u7528\u4e8e\u6807\u8bc6\u786c\u4ef6\u73af\u5883\uff0c\u53ef\u4ee5\u5305\u542b\u8ba1\u7b97\u67b6\u6784\u7c7b\u578b\u3001\u7248\u672c\u53f7\u7b49\u4fe1\u606f\u3002 \u63a8\u7406\u5f15\u64ce\u540d\u79f0\uff1a \u7528\u4e8e\u6807\u8bc6\u63a8\u7406\u5f15\u64ce\uff0c\u53ef\u4ee5\u5305\u542b\u63a8\u7406\u5f15\u64ce\u540d\u79f0\u3001\u7248\u672c\u53f7\u3001\u4f18\u5316\u9009\u9879\u7b49\u4fe1\u606f\u3002 \u65f6\u95f4\u6233\uff1a \u8be5\u8bc4\u4f30\u8868\u7684\u521b\u5efa\u65f6\u95f4\u3002 \u64cd\u4f5c\u4fe1\u606f \u64cd\u4f5c\u4fe1\u606f\u5b57\u6bb5\u4e4b\u95f4\u4ee5\u9017\u53f7\u5206\u5272\u3002\u64cd\u4f5c\u4fe1\u606f\u4e0e\u5ef6\u8fdf\u4fe1\u606f\u4e4b\u95f4\u4ee5\u5236\u8868\u7b26\u5206\u5272\u3002 conv2d \u683c\u5f0f op_type,flag_bias,flag_relu,n_in,c_in,h_in,w_in,c_out,groups,kernel,padding,stride,dilation\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 flag_bias (int) - \u662f\u5426\u6709 bias\uff080\uff1a\u65e0\uff0c1\uff1a\u6709\uff09\u3002 flag_relu (int) - \u662f\u5426\u6709 relu\uff080\uff1a\u65e0\uff0c1\uff1a\u6709\uff09\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 c_out (int) - \u8f93\u51fa Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 groups (int) - \u5377\u79ef\u4e8c\u7ef4\u5c42\uff08Conv2D Layer\uff09\u7684\u7ec4\u6570\u3002 kernel (int) - \u5377\u79ef\u6838\u5927\u5c0f\u3002 padding (int) - \u586b\u5145 (padding) \u5927\u5c0f\u3002 stride (int) - \u6b65\u957f (stride) \u5927\u5c0f\u3002 dilation (int) - \u81a8\u80c0 (dilation) \u5927\u5c0f\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4 activation \u683c\u5f0f op_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4 batch_norm \u683c\u5f0f op_type,active_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 active_type (string) - \u6fc0\u6d3b\u51fd\u6570\u7c7b\u578b\uff0c\u5305\u542b\uff1arelu, prelu, sigmoid, relu6, tanh\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4 eltwise \u683c\u5f0f op_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4 pooling \u683c\u5f0f op_type,flag_global_pooling,n_in,c_in,h_in,w_in,kernel,padding,stride,ceil_mode,pool_type\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 flag_global_pooling (int) - \u662f\u5426\u4e3a\u5168\u5c40\u6c60\u5316\uff080\uff1a\u4e0d\u662f\uff0c1\uff1a\u662f\uff09\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 kernel (int) - \u5377\u79ef\u6838\u5927\u5c0f\u3002 padding (int) - \u586b\u5145 (padding) \u5927\u5c0f\u3002 stride (int) - \u6b65\u957f (stride) \u5927\u5c0f\u3002 ceil_mode (int) - \u662f\u5426\u7528 ceil \u51fd\u6570\u8ba1\u7b97\u8f93\u51fa\u9ad8\u5ea6\u548c\u5bbd\u5ea6\u30020 \u8868\u793a\u4f7f\u7528 floor \u51fd\u6570\uff0c1 \u8868\u793a\u4f7f\u7528 ceil \u51fd\u6570\u3002 pool_type (int) - \u6c60\u5316\u7c7b\u578b\uff0c\u5176\u4e2d 1 \u8868\u793a pooling_max\uff0c2 \u8868\u793a pooling_average_include_padding\uff0c3 \u8868\u793a pooling_average_exclude_padding\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4 softmax \u683c\u5f0f op_type,axis,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 axis (int) - \u6267\u884c softmax \u8ba1\u7b97\u7684\u7ef4\u5ea6\u7d22\u5f15\uff0c\u5e94\u8be5\u5728 [\u22121\uff0crank \u2212 1] \u8303\u56f4\u5185\uff0c\u5176\u4e2d rank \u662f\u8f93\u5165\u53d8\u91cf\u7684\u79e9\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868"},{"location":"docs/table_latency/#_1","text":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7528\u4e8e\u5feb\u901f\u8bc4\u4f30\u4e00\u4e2a\u6a21\u578b\u5728\u7279\u5b9a\u786c\u4ef6\u73af\u5883\u548c\u63a8\u7406\u5f15\u64ce\u4e0a\u7684\u63a8\u7406\u901f\u5ea6\u3002 \u8be5\u6587\u6863\u4e3b\u8981\u7528\u4e8e\u5b9a\u4e49PaddleSlim\u652f\u6301\u7684\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7684\u683c\u5f0f\u3002","title":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868"},{"location":"docs/table_latency/#_2","text":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4e2d\u5b58\u653e\u7740\u6240\u6709\u53ef\u80fd\u7684\u64cd\u4f5c\u5bf9\u5e94\u7684\u5ef6\u65f6\u4fe1\u606f\uff0c\u8be5\u8868\u4e2d\u7684\u4e00\u4e2a\u64cd\u4f5c\u5305\u62ec\u64cd\u4f5c\u7c7b\u578b\u548c\u64cd\u4f5c\u53c2\u6570\uff0c\u6bd4\u5982\uff1a\u64cd\u4f5c\u7c7b\u578b\u53ef\u4ee5\u662f conv2d \uff0c\u5bf9\u5e94\u7684\u64cd\u4f5c\u53c2\u6570\u6709\u8f93\u5165\u7279\u5f81\u56fe\u7684\u5927\u5c0f\u3001\u5377\u79ef\u6838\u4e2a\u6570\u3001\u5377\u79ef\u6838\u5927\u5c0f\u7b49\u3002 \u7ed9\u5b9a\u64cd\u4f5c\u7684\u5ef6\u65f6\u4f9d\u8d56\u4e8e\u786c\u4ef6\u73af\u5883\u548c\u63a8\u7406\u5f15\u64ce\u3002","title":"\u6982\u8ff0"},{"location":"docs/table_latency/#_3","text":"\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4ee5\u6587\u4ef6\u6216\u591a\u884c\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u4fdd\u5b58\u3002 \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u7b2c\u4e00\u884c\u4fdd\u5b58\u7248\u672c\u4fe1\u606f\uff0c\u540e\u7eed\u6bcf\u884c\u4e3a\u4e00\u4e2a\u64cd\u4f5c\u548c\u5bf9\u5e94\u7684\u5ef6\u65f6\u4fe1\u606f\u3002","title":"\u6574\u4f53\u683c\u5f0f"},{"location":"docs/table_latency/#_4","text":"\u7248\u672c\u4fe1\u606f\u4ee5\u82f1\u6587\u5b57\u7b26\u9017\u53f7\u5206\u5272\uff0c\u5185\u5bb9\u4f9d\u6b21\u4e3a\u786c\u4ef6\u73af\u5883\u540d\u79f0\u3001\u63a8\u7406\u5f15\u64ce\u540d\u79f0\u548c\u65f6\u95f4\u6233\u3002 \u786c\u4ef6\u73af\u5883\u540d\u79f0\uff1a \u7528\u4e8e\u6807\u8bc6\u786c\u4ef6\u73af\u5883\uff0c\u53ef\u4ee5\u5305\u542b\u8ba1\u7b97\u67b6\u6784\u7c7b\u578b\u3001\u7248\u672c\u53f7\u7b49\u4fe1\u606f\u3002 \u63a8\u7406\u5f15\u64ce\u540d\u79f0\uff1a \u7528\u4e8e\u6807\u8bc6\u63a8\u7406\u5f15\u64ce\uff0c\u53ef\u4ee5\u5305\u542b\u63a8\u7406\u5f15\u64ce\u540d\u79f0\u3001\u7248\u672c\u53f7\u3001\u4f18\u5316\u9009\u9879\u7b49\u4fe1\u606f\u3002 \u65f6\u95f4\u6233\uff1a \u8be5\u8bc4\u4f30\u8868\u7684\u521b\u5efa\u65f6\u95f4\u3002","title":"\u7248\u672c\u4fe1\u606f"},{"location":"docs/table_latency/#_5","text":"\u64cd\u4f5c\u4fe1\u606f\u5b57\u6bb5\u4e4b\u95f4\u4ee5\u9017\u53f7\u5206\u5272\u3002\u64cd\u4f5c\u4fe1\u606f\u4e0e\u5ef6\u8fdf\u4fe1\u606f\u4e4b\u95f4\u4ee5\u5236\u8868\u7b26\u5206\u5272\u3002","title":"\u64cd\u4f5c\u4fe1\u606f"},{"location":"docs/table_latency/#conv2d","text":"\u683c\u5f0f op_type,flag_bias,flag_relu,n_in,c_in,h_in,w_in,c_out,groups,kernel,padding,stride,dilation\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 flag_bias (int) - \u662f\u5426\u6709 bias\uff080\uff1a\u65e0\uff0c1\uff1a\u6709\uff09\u3002 flag_relu (int) - \u662f\u5426\u6709 relu\uff080\uff1a\u65e0\uff0c1\uff1a\u6709\uff09\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 c_out (int) - \u8f93\u51fa Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 groups (int) - \u5377\u79ef\u4e8c\u7ef4\u5c42\uff08Conv2D Layer\uff09\u7684\u7ec4\u6570\u3002 kernel (int) - \u5377\u79ef\u6838\u5927\u5c0f\u3002 padding (int) - \u586b\u5145 (padding) \u5927\u5c0f\u3002 stride (int) - \u6b65\u957f (stride) \u5927\u5c0f\u3002 dilation (int) - \u81a8\u80c0 (dilation) \u5927\u5c0f\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"conv2d"},{"location":"docs/table_latency/#activation","text":"\u683c\u5f0f op_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"activation"},{"location":"docs/table_latency/#batch_norm","text":"\u683c\u5f0f op_type,active_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 active_type (string) - \u6fc0\u6d3b\u51fd\u6570\u7c7b\u578b\uff0c\u5305\u542b\uff1arelu, prelu, sigmoid, relu6, tanh\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"batch_norm"},{"location":"docs/table_latency/#eltwise","text":"\u683c\u5f0f op_type,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"eltwise"},{"location":"docs/table_latency/#pooling","text":"\u683c\u5f0f op_type,flag_global_pooling,n_in,c_in,h_in,w_in,kernel,padding,stride,ceil_mode,pool_type\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 flag_global_pooling (int) - \u662f\u5426\u4e3a\u5168\u5c40\u6c60\u5316\uff080\uff1a\u4e0d\u662f\uff0c1\uff1a\u662f\uff09\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 kernel (int) - \u5377\u79ef\u6838\u5927\u5c0f\u3002 padding (int) - \u586b\u5145 (padding) \u5927\u5c0f\u3002 stride (int) - \u6b65\u957f (stride) \u5927\u5c0f\u3002 ceil_mode (int) - \u662f\u5426\u7528 ceil \u51fd\u6570\u8ba1\u7b97\u8f93\u51fa\u9ad8\u5ea6\u548c\u5bbd\u5ea6\u30020 \u8868\u793a\u4f7f\u7528 floor \u51fd\u6570\uff0c1 \u8868\u793a\u4f7f\u7528 ceil \u51fd\u6570\u3002 pool_type (int) - \u6c60\u5316\u7c7b\u578b\uff0c\u5176\u4e2d 1 \u8868\u793a pooling_max\uff0c2 \u8868\u793a pooling_average_include_padding\uff0c3 \u8868\u793a pooling_average_exclude_padding\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"pooling"},{"location":"docs/table_latency/#softmax","text":"\u683c\u5f0f op_type,axis,n_in,c_in,h_in,w_in\\tlatency \u5b57\u6bb5\u89e3\u91ca op_type(str) - \u5f53\u524dop\u7c7b\u578b\u3002 axis (int) - \u6267\u884c softmax \u8ba1\u7b97\u7684\u7ef4\u5ea6\u7d22\u5f15\uff0c\u5e94\u8be5\u5728 [\u22121\uff0crank \u2212 1] \u8303\u56f4\u5185\uff0c\u5176\u4e2d rank \u662f\u8f93\u5165\u53d8\u91cf\u7684\u79e9\u3002 n_in (int) - \u8f93\u5165 Tensor \u7684\u6279\u5c3a\u5bf8 (batch size)\u3002 c_in (int) - \u8f93\u5165 Tensor \u7684\u901a\u9053 (channel) \u6570\u3002 h_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u9ad8\u5ea6\u3002 w_in (int) - \u8f93\u5165 Tensor \u7684\u7279\u5f81\u5bbd\u5ea6\u3002 latency (float) - \u5f53\u524dop\u7684\u5ef6\u65f6\u65f6\u95f4","title":"softmax"},{"location":"docs/api/analysis_api/","text":"\u6a21\u578b\u5206\u6790API\u6587\u6863 flops paddleslim.analysis.flops(program, detail=False) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u6bcf\u79d2\u6d6e\u70b9\u8fd0\u7b97\u6b21\u6570(FLOPS)\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u5206\u6790\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 detail(bool): \u662f\u5426\u8fd4\u56de\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684FLOPS\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 \u8fd4\u56de\u503c\uff1a flops(float): \u6574\u4e2a\u7f51\u7edc\u7684FLOPS\u3002 params2flops(dict): \u6bcf\u5c42\u5377\u79ef\u5bf9\u5e94\u7684FLOPS\uff0c\u5176\u4e2dkey\u4e3a\u5377\u79ef\u5c42\u53c2\u6570\u540d\u79f0\uff0cvalue\u4e3aFLOPS\u503c\u3002 \u793a\u4f8b\uff1a import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.analysis import flops def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_bn_layer(input, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") print(\"FLOPS: {}\".format(flops(main_program))) model_size paddleslim.analysis.model_size(program) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u53c2\u6570\u6570\u91cf\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u5206\u6790\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 \u8fd4\u56de\u503c\uff1a model_size(int): \u6574\u4e2a\u7f51\u7edc\u7684\u53c2\u6570\u6570\u91cf\u3002 \u793a\u4f8b\uff1a import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.analysis import model_size def conv_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") return conv main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_layer(input, 8, 3, \"conv1\") conv2 = conv_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_layer(sum1, 8, 3, \"conv3\") conv4 = conv_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_layer(sum2, 8, 3, \"conv5\") conv6 = conv_layer(conv5, 8, 3, \"conv6\") print(\"FLOPS: {}\".format(model_size(main_program))) TableLatencyEvaluator paddleslim.analysis.TableLatencyEvaluator(table_file, delimiter=\",\") \u6e90\u4ee3\u7801 \u57fa\u4e8e\u786c\u4ef6\u5ef6\u65f6\u8868\u7684\u6a21\u578b\u5ef6\u65f6\u8bc4\u4f30\u5668\u3002 \u53c2\u6570\uff1a table_file(str): \u6240\u4f7f\u7528\u7684\u5ef6\u65f6\u8bc4\u4f30\u8868\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u5173\u4e8e\u6f14\u793a\u8bc4\u4f30\u8868\u683c\u5f0f\u8bf7\u53c2\u8003\uff1a PaddleSlim\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u683c\u5f0f delimiter(str): \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4e2d\uff0c\u64cd\u4f5c\u4fe1\u606f\u4e4b\u524d\u6240\u4f7f\u7528\u7684\u5206\u5272\u7b26\uff0c\u9ed8\u8ba4\u4e3a\u82f1\u6587\u5b57\u7b26\u9017\u53f7\u3002 \u8fd4\u56de\u503c\uff1a Evaluator: \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u5668\u7684\u5b9e\u4f8b\u3002 paddleslim.analysis.TableLatencyEvaluator.latency(graph) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u9884\u4f30\u5ef6\u65f6\u3002 \u53c2\u6570\uff1a graph(Program): \u5f85\u9884\u4f30\u7684\u76ee\u6807\u7f51\u7edc\u3002 \u8fd4\u56de\u503c\uff1a latency: \u76ee\u6807\u7f51\u7edc\u7684\u9884\u4f30\u5ef6\u65f6\u3002","title":"\u6a21\u578b\u5206\u6790API\u6587\u6863"},{"location":"docs/api/analysis_api/#api","text":"","title":"\u6a21\u578b\u5206\u6790API\u6587\u6863"},{"location":"docs/api/analysis_api/#flops","text":"paddleslim.analysis.flops(program, detail=False) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u6bcf\u79d2\u6d6e\u70b9\u8fd0\u7b97\u6b21\u6570(FLOPS)\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u5206\u6790\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 detail(bool): \u662f\u5426\u8fd4\u56de\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684FLOPS\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 \u8fd4\u56de\u503c\uff1a flops(float): \u6574\u4e2a\u7f51\u7edc\u7684FLOPS\u3002 params2flops(dict): \u6bcf\u5c42\u5377\u79ef\u5bf9\u5e94\u7684FLOPS\uff0c\u5176\u4e2dkey\u4e3a\u5377\u79ef\u5c42\u53c2\u6570\u540d\u79f0\uff0cvalue\u4e3aFLOPS\u503c\u3002 \u793a\u4f8b\uff1a import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.analysis import flops def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_bn_layer(input, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") print(\"FLOPS: {}\".format(flops(main_program)))","title":"flops"},{"location":"docs/api/analysis_api/#model_size","text":"paddleslim.analysis.model_size(program) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u53c2\u6570\u6570\u91cf\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u5206\u6790\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 \u8fd4\u56de\u503c\uff1a model_size(int): \u6574\u4e2a\u7f51\u7edc\u7684\u53c2\u6570\u6570\u91cf\u3002 \u793a\u4f8b\uff1a import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.analysis import model_size def conv_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") return conv main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_layer(input, 8, 3, \"conv1\") conv2 = conv_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_layer(sum1, 8, 3, \"conv3\") conv4 = conv_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_layer(sum2, 8, 3, \"conv5\") conv6 = conv_layer(conv5, 8, 3, \"conv6\") print(\"FLOPS: {}\".format(model_size(main_program)))","title":"model_size"},{"location":"docs/api/analysis_api/#tablelatencyevaluator","text":"paddleslim.analysis.TableLatencyEvaluator(table_file, delimiter=\",\") \u6e90\u4ee3\u7801 \u57fa\u4e8e\u786c\u4ef6\u5ef6\u65f6\u8868\u7684\u6a21\u578b\u5ef6\u65f6\u8bc4\u4f30\u5668\u3002 \u53c2\u6570\uff1a table_file(str): \u6240\u4f7f\u7528\u7684\u5ef6\u65f6\u8bc4\u4f30\u8868\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u5173\u4e8e\u6f14\u793a\u8bc4\u4f30\u8868\u683c\u5f0f\u8bf7\u53c2\u8003\uff1a PaddleSlim\u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u683c\u5f0f delimiter(str): \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u8868\u4e2d\uff0c\u64cd\u4f5c\u4fe1\u606f\u4e4b\u524d\u6240\u4f7f\u7528\u7684\u5206\u5272\u7b26\uff0c\u9ed8\u8ba4\u4e3a\u82f1\u6587\u5b57\u7b26\u9017\u53f7\u3002 \u8fd4\u56de\u503c\uff1a Evaluator: \u786c\u4ef6\u5ef6\u65f6\u8bc4\u4f30\u5668\u7684\u5b9e\u4f8b\u3002 paddleslim.analysis.TableLatencyEvaluator.latency(graph) \u6e90\u4ee3\u7801 \u83b7\u5f97\u6307\u5b9a\u7f51\u7edc\u7684\u9884\u4f30\u5ef6\u65f6\u3002 \u53c2\u6570\uff1a graph(Program): \u5f85\u9884\u4f30\u7684\u76ee\u6807\u7f51\u7edc\u3002 \u8fd4\u56de\u503c\uff1a latency: \u76ee\u6807\u7f51\u7edc\u7684\u9884\u4f30\u5ef6\u65f6\u3002","title":"TableLatencyEvaluator"},{"location":"docs/api/api_guide/","text":"PaddleSlim API\u6587\u6863\u5bfc\u822a \u6a21\u578b\u5206\u6790 \u5377\u79ef\u901a\u9053\u526a\u88c1 \u84b8\u998f \u5355\u8fdb\u7a0b\u84b8\u998f \u901a\u9053\u526a\u88c1 \u91cf\u5316 \u91cf\u5316\u8bad\u7ec3 \u79bb\u7ebf\u91cf\u5316 embedding\u91cf\u5316 \u5c0f\u6a21\u578b\u7ed3\u6784\u641c\u7d22 nas API SearchSpace","title":"PaddleSlim API\u6587\u6863\u5bfc\u822a"},{"location":"docs/api/api_guide/#paddleslim-api","text":"","title":"PaddleSlim API\u6587\u6863\u5bfc\u822a"},{"location":"docs/api/api_guide/#_1","text":"","title":"\u6a21\u578b\u5206\u6790"},{"location":"docs/api/api_guide/#_2","text":"","title":"\u5377\u79ef\u901a\u9053\u526a\u88c1"},{"location":"docs/api/api_guide/#_3","text":"\u5355\u8fdb\u7a0b\u84b8\u998f \u901a\u9053\u526a\u88c1","title":"\u84b8\u998f"},{"location":"docs/api/api_guide/#_4","text":"\u91cf\u5316\u8bad\u7ec3 \u79bb\u7ebf\u91cf\u5316 embedding\u91cf\u5316","title":"\u91cf\u5316"},{"location":"docs/api/api_guide/#_5","text":"nas API SearchSpace","title":"\u5c0f\u6a21\u578b\u7ed3\u6784\u641c\u7d22"},{"location":"docs/api/nas_api/","text":"paddleslim.nas API\u6587\u6863 SANAS API\u6587\u6863 class SANAS SANAS\uff08Simulated Annealing Neural Architecture Search\uff09\u662f\u57fa\u4e8e\u6a21\u62df\u9000\u706b\u7b97\u6cd5\u8fdb\u884c\u6a21\u578b\u7ed3\u6784\u641c\u7d22\u7684\u7b97\u6cd5\uff0c\u4e00\u822c\u7528\u4e8e\u79bb\u6563\u641c\u7d22\u4efb\u52a1\u3002 paddleslim.nas.SANAS(configs, server_addr, init_temperature, reduce_rate, search_steps, save_checkpoint, load_checkpoint, is_server) \u53c2\u6570\uff1a - configs(list ): \u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u5217\u8868\uff0c\u683c\u5f0f\u662f [(key, {input_size, output_size, block_num, block_mask})] \u6216\u8005 [(key)] \uff08MobileNetV2\u3001MobilenetV1\u548cResNet\u7684\u641c\u7d22\u7a7a\u95f4\u4f7f\u7528\u548c\u539f\u672c\u7f51\u7edc\u7ed3\u6784\u76f8\u540c\u7684\u641c\u7d22\u7a7a\u95f4\uff0c\u6240\u4ee5\u4ec5\u9700\u6307\u5b9a key \u5373\u53ef\uff09, input_size \u548c output_size \u8868\u793a\u8f93\u5165\u548c\u8f93\u51fa\u7684\u7279\u5f81\u56fe\u7684\u5927\u5c0f\uff0c block_num \u662f\u6307\u641c\u7d22\u7f51\u7edc\u4e2d\u7684block\u6570\u91cf\uff0c block_mask \u662f\u4e00\u7ec4\u75310\u548c1\u7ec4\u6210\u7684\u5217\u8868\uff0c0\u4ee3\u8868\u4e0d\u8fdb\u884c\u4e0b\u91c7\u6837\u7684block\uff0c1\u4ee3\u8868\u4e0b\u91c7\u6837\u7684block\u3002 \u66f4\u591apaddleslim\u63d0\u4f9b\u7684\u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003\u3002 - server_addr(tuple): SANAS\u7684\u5730\u5740\uff0c\u5305\u62ecserver\u7684ip\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff0c\u5982\u679cip\u5730\u5740\u4e3aNone\u6216\u8005\u4e3a\"\"\u7684\u8bdd\u5219\u9ed8\u8ba4\u4f7f\u7528\u672c\u673aip\u3002\u9ed8\u8ba4\uff1a\uff08\"\", 8881\uff09\u3002 - init_temperature(float): \u57fa\u4e8e\u6a21\u62df\u9000\u706b\u8fdb\u884c\u641c\u7d22\u7684\u521d\u59cb\u6e29\u5ea6\u3002\u9ed8\u8ba4\uff1a100\u3002 - reduce_rate(float): \u57fa\u4e8e\u6a21\u62df\u9000\u706b\u8fdb\u884c\u641c\u7d22\u7684\u8870\u51cf\u7387\u3002\u9ed8\u8ba4\uff1a0.85\u3002 - search_steps(int): \u641c\u7d22\u8fc7\u7a0b\u8fed\u4ee3\u7684\u6b21\u6570\u3002\u9ed8\u8ba4\uff1a300\u3002 - save_checkpoint(str|None): \u4fdd\u5b58checkpoint\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3aNone\u7684\u8bdd\u5219\u4e0d\u4fdd\u5b58checkpoint\u3002\u9ed8\u8ba4\uff1a ./nas_checkpoint \u3002 - load_checkpoint(str|None): \u52a0\u8f7dcheckpoint\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3aNone\u7684\u8bdd\u5219\u4e0d\u52a0\u8f7dcheckpoint\u3002\u9ed8\u8ba4\uff1aNone\u3002 - is_server(bool): \u5f53\u524d\u5b9e\u4f8b\u662f\u5426\u8981\u542f\u52a8\u4e00\u4e2aserver\u3002\u9ed8\u8ba4\uff1aTrue\u3002 \u8fd4\u56de\uff1a \u4e00\u4e2aSANAS\u7c7b\u7684\u5b9e\u4f8b \u793a\u4f8b\u4ee3\u7801\uff1a from paddleslim.nas import SANAS config = [('MobileNetV2Space')] sanas = SANAS(config=config) tokens2arch(tokens) \u901a\u8fc7\u4e00\u7ec4token\u5f97\u5230\u5b9e\u9645\u7684\u6a21\u578b\u7ed3\u6784\uff0c\u4e00\u822c\u7528\u6765\u628a\u641c\u7d22\u5230\u6700\u4f18\u7684token\u8f6c\u6362\u4e3a\u6a21\u578b\u7ed3\u6784\u7528\u6765\u505a\u6700\u540e\u7684\u8bad\u7ec3\u3002 \u53c2\u6570\uff1a - tokens(list): \u4e00\u7ec4token\u3002 \u8fd4\u56de \u8fd4\u56de\u4e00\u4e2a\u6a21\u578b\u7ed3\u6784\u5b9e\u4f8b\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a import paddle.fluid as fluid input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32') archs = sanas.token2arch(tokens) for arch in archs: output = arch(input) input = output next_archs(): \u83b7\u53d6\u4e0b\u4e00\u7ec4\u6a21\u578b\u7ed3\u6784\u3002 \u8fd4\u56de \u8fd4\u56de\u6a21\u578b\u7ed3\u6784\u5b9e\u4f8b\u7684\u5217\u8868\uff0c\u5f62\u5f0f\u4e3alist\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a import paddle.fluid as fluid input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32') archs = sanas.next_archs() for arch in archs: output = arch(input) input = output reward(score): \u628a\u5f53\u524d\u6a21\u578b\u7ed3\u6784\u7684\u5f97\u5206\u60c5\u51b5\u56de\u4f20\u3002 \u53c2\u6570\uff1a score : \u5f53\u524d\u6a21\u578b\u7684\u5f97\u5206\uff0c\u5206\u6570\u8d8a\u5927\u8d8a\u597d\u3002 \u8fd4\u56de \u6a21\u578b\u7ed3\u6784\u66f4\u65b0\u6210\u529f\u6216\u8005\u5931\u8d25\uff0c\u6210\u529f\u5219\u8fd4\u56de True \uff0c\u5931\u8d25\u5219\u8fd4\u56de False \u3002 \u4ee3\u7801\u793a\u4f8b import numpy as np import paddle import paddle.fluid as fluid from paddleslim.nas import SANAS from paddleslim.analysis import flops max_flops = 321208544 batch_size = 256 # \u641c\u7d22\u7a7a\u95f4\u914d\u7f6e config=[('MobileNetV2Space')] # \u5b9e\u4f8b\u5316SANAS sa_nas = SANAS(config, server_addr=(\"\", 8887), init_temperature=10.24, reduce_rate=0.85, search_steps=100, is_server=True) for step in range(100): archs = sa_nas.next_archs() train_program = fluid.Program() test_program = fluid.Program() startup_program = fluid.Program() ### \u6784\u9020\u8bad\u7ec3program with fluid.program_guard(train_program, startup_program): image = fluid.data(name='image', shape=[None, 3, 32, 32], dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') for arch in archs: output = arch(image) out = fluid.layers.fc(output, size=10, act=\"softmax\") softmax_out = fluid.layers.softmax(input=out, use_cudnn=False) cost = fluid.layers.cross_entropy(input=softmax_out, label=label) avg_cost = fluid.layers.mean(cost) acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1) ### \u6784\u9020\u6d4b\u8bd5program test_program = train_program.clone(for_test=True) ### \u5b9a\u4e49\u4f18\u5316\u5668 sgd = fluid.optimizer.SGD(learning_rate=1e-3) sgd.minimize(avg_cost) ### \u589e\u52a0\u9650\u5236\u6761\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\u5219\u8fdb\u884c\u65e0\u9650\u5236\u641c\u7d22 if flops(train_program) > max_flops: continue ### \u5b9a\u4e49\u4ee3\u7801\u662f\u5728cpu\u4e0a\u8fd0\u884c place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(startup_program) ### \u5b9a\u4e49\u8bad\u7ec3\u8f93\u5165\u6570\u636e train_reader = paddle.batch( paddle.reader.shuffle( paddle.dataset.cifar.train10(cycle=False), buf_size=1024), batch_size=batch_size, drop_last=True) ### \u5b9a\u4e49\u9884\u6d4b\u8f93\u5165\u6570\u636e test_reader = paddle.batch( paddle.dataset.cifar.test10(cycle=False), batch_size=batch_size, drop_last=False) train_feeder = fluid.DataFeeder([image, label], place, program=train_program) test_feeder = fluid.DataFeeder([image, label], place, program=test_program) ### \u5f00\u59cb\u8bad\u7ec3\uff0c\u6bcf\u4e2a\u641c\u7d22\u7ed3\u679c\u8bad\u7ec35\u4e2aepoch for epoch_id in range(5): for batch_id, data in enumerate(train_reader()): fetches = [avg_cost.name] outs = exe.run(train_program, feed=train_feeder.feed(data), fetch_list=fetches)[0] if batch_id % 10 == 0: print('TRAIN: steps: {}, epoch: {}, batch: {}, cost: {}'.format(step, epoch_id, batch_id, outs[0])) ### \u5f00\u59cb\u9884\u6d4b\uff0c\u5f97\u5230\u6700\u7ec8\u7684\u6d4b\u8bd5\u7ed3\u679c\u4f5c\u4e3ascore\u56de\u4f20\u7ed9sa_nas reward = [] for batch_id, data in enumerate(test_reader()): test_fetches = [ avg_cost.name, acc_top1.name ] batch_reward = exe.run(test_program, feed=test_feeder.feed(data), fetch_list=test_fetches) reward_avg = np.mean(np.array(batch_reward), axis=1) reward.append(reward_avg) print('TEST: step: {}, batch: {}, avg_cost: {}, acc_top1: {}'. format(step, batch_id, batch_reward[0],batch_reward[1])) finally_reward = np.mean(np.array(reward), axis=0) print( 'FINAL TEST: avg_cost: {}, acc_top1: {}'.format( finally_reward[0], finally_reward[1])) ### \u56de\u4f20score sa_nas.reward(float(finally_reward[1]))","title":"paddleslim.nas API\u6587\u6863"},{"location":"docs/api/nas_api/#paddleslimnas-api","text":"","title":"paddleslim.nas API\u6587\u6863"},{"location":"docs/api/nas_api/#sanas-api","text":"","title":"SANAS API\u6587\u6863"},{"location":"docs/api/nas_api/#class-sanas","text":"SANAS\uff08Simulated Annealing Neural Architecture Search\uff09\u662f\u57fa\u4e8e\u6a21\u62df\u9000\u706b\u7b97\u6cd5\u8fdb\u884c\u6a21\u578b\u7ed3\u6784\u641c\u7d22\u7684\u7b97\u6cd5\uff0c\u4e00\u822c\u7528\u4e8e\u79bb\u6563\u641c\u7d22\u4efb\u52a1\u3002 paddleslim.nas.SANAS(configs, server_addr, init_temperature, reduce_rate, search_steps, save_checkpoint, load_checkpoint, is_server) \u53c2\u6570\uff1a - configs(list ): \u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u5217\u8868\uff0c\u683c\u5f0f\u662f [(key, {input_size, output_size, block_num, block_mask})] \u6216\u8005 [(key)] \uff08MobileNetV2\u3001MobilenetV1\u548cResNet\u7684\u641c\u7d22\u7a7a\u95f4\u4f7f\u7528\u548c\u539f\u672c\u7f51\u7edc\u7ed3\u6784\u76f8\u540c\u7684\u641c\u7d22\u7a7a\u95f4\uff0c\u6240\u4ee5\u4ec5\u9700\u6307\u5b9a key \u5373\u53ef\uff09, input_size \u548c output_size \u8868\u793a\u8f93\u5165\u548c\u8f93\u51fa\u7684\u7279\u5f81\u56fe\u7684\u5927\u5c0f\uff0c block_num \u662f\u6307\u641c\u7d22\u7f51\u7edc\u4e2d\u7684block\u6570\u91cf\uff0c block_mask \u662f\u4e00\u7ec4\u75310\u548c1\u7ec4\u6210\u7684\u5217\u8868\uff0c0\u4ee3\u8868\u4e0d\u8fdb\u884c\u4e0b\u91c7\u6837\u7684block\uff0c1\u4ee3\u8868\u4e0b\u91c7\u6837\u7684block\u3002 \u66f4\u591apaddleslim\u63d0\u4f9b\u7684\u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003\u3002 - server_addr(tuple): SANAS\u7684\u5730\u5740\uff0c\u5305\u62ecserver\u7684ip\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff0c\u5982\u679cip\u5730\u5740\u4e3aNone\u6216\u8005\u4e3a\"\"\u7684\u8bdd\u5219\u9ed8\u8ba4\u4f7f\u7528\u672c\u673aip\u3002\u9ed8\u8ba4\uff1a\uff08\"\", 8881\uff09\u3002 - init_temperature(float): \u57fa\u4e8e\u6a21\u62df\u9000\u706b\u8fdb\u884c\u641c\u7d22\u7684\u521d\u59cb\u6e29\u5ea6\u3002\u9ed8\u8ba4\uff1a100\u3002 - reduce_rate(float): \u57fa\u4e8e\u6a21\u62df\u9000\u706b\u8fdb\u884c\u641c\u7d22\u7684\u8870\u51cf\u7387\u3002\u9ed8\u8ba4\uff1a0.85\u3002 - search_steps(int): \u641c\u7d22\u8fc7\u7a0b\u8fed\u4ee3\u7684\u6b21\u6570\u3002\u9ed8\u8ba4\uff1a300\u3002 - save_checkpoint(str|None): \u4fdd\u5b58checkpoint\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3aNone\u7684\u8bdd\u5219\u4e0d\u4fdd\u5b58checkpoint\u3002\u9ed8\u8ba4\uff1a ./nas_checkpoint \u3002 - load_checkpoint(str|None): \u52a0\u8f7dcheckpoint\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3aNone\u7684\u8bdd\u5219\u4e0d\u52a0\u8f7dcheckpoint\u3002\u9ed8\u8ba4\uff1aNone\u3002 - is_server(bool): \u5f53\u524d\u5b9e\u4f8b\u662f\u5426\u8981\u542f\u52a8\u4e00\u4e2aserver\u3002\u9ed8\u8ba4\uff1aTrue\u3002 \u8fd4\u56de\uff1a \u4e00\u4e2aSANAS\u7c7b\u7684\u5b9e\u4f8b \u793a\u4f8b\u4ee3\u7801\uff1a from paddleslim.nas import SANAS config = [('MobileNetV2Space')] sanas = SANAS(config=config) tokens2arch(tokens) \u901a\u8fc7\u4e00\u7ec4token\u5f97\u5230\u5b9e\u9645\u7684\u6a21\u578b\u7ed3\u6784\uff0c\u4e00\u822c\u7528\u6765\u628a\u641c\u7d22\u5230\u6700\u4f18\u7684token\u8f6c\u6362\u4e3a\u6a21\u578b\u7ed3\u6784\u7528\u6765\u505a\u6700\u540e\u7684\u8bad\u7ec3\u3002 \u53c2\u6570\uff1a - tokens(list): \u4e00\u7ec4token\u3002 \u8fd4\u56de \u8fd4\u56de\u4e00\u4e2a\u6a21\u578b\u7ed3\u6784\u5b9e\u4f8b\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a import paddle.fluid as fluid input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32') archs = sanas.token2arch(tokens) for arch in archs: output = arch(input) input = output next_archs(): \u83b7\u53d6\u4e0b\u4e00\u7ec4\u6a21\u578b\u7ed3\u6784\u3002 \u8fd4\u56de \u8fd4\u56de\u6a21\u578b\u7ed3\u6784\u5b9e\u4f8b\u7684\u5217\u8868\uff0c\u5f62\u5f0f\u4e3alist\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a import paddle.fluid as fluid input = fluid.data(name='input', shape=[None, 3, 32, 32], dtype='float32') archs = sanas.next_archs() for arch in archs: output = arch(input) input = output reward(score): \u628a\u5f53\u524d\u6a21\u578b\u7ed3\u6784\u7684\u5f97\u5206\u60c5\u51b5\u56de\u4f20\u3002 \u53c2\u6570\uff1a score : \u5f53\u524d\u6a21\u578b\u7684\u5f97\u5206\uff0c\u5206\u6570\u8d8a\u5927\u8d8a\u597d\u3002 \u8fd4\u56de \u6a21\u578b\u7ed3\u6784\u66f4\u65b0\u6210\u529f\u6216\u8005\u5931\u8d25\uff0c\u6210\u529f\u5219\u8fd4\u56de True \uff0c\u5931\u8d25\u5219\u8fd4\u56de False \u3002 \u4ee3\u7801\u793a\u4f8b import numpy as np import paddle import paddle.fluid as fluid from paddleslim.nas import SANAS from paddleslim.analysis import flops max_flops = 321208544 batch_size = 256 # \u641c\u7d22\u7a7a\u95f4\u914d\u7f6e config=[('MobileNetV2Space')] # \u5b9e\u4f8b\u5316SANAS sa_nas = SANAS(config, server_addr=(\"\", 8887), init_temperature=10.24, reduce_rate=0.85, search_steps=100, is_server=True) for step in range(100): archs = sa_nas.next_archs() train_program = fluid.Program() test_program = fluid.Program() startup_program = fluid.Program() ### \u6784\u9020\u8bad\u7ec3program with fluid.program_guard(train_program, startup_program): image = fluid.data(name='image', shape=[None, 3, 32, 32], dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') for arch in archs: output = arch(image) out = fluid.layers.fc(output, size=10, act=\"softmax\") softmax_out = fluid.layers.softmax(input=out, use_cudnn=False) cost = fluid.layers.cross_entropy(input=softmax_out, label=label) avg_cost = fluid.layers.mean(cost) acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1) ### \u6784\u9020\u6d4b\u8bd5program test_program = train_program.clone(for_test=True) ### \u5b9a\u4e49\u4f18\u5316\u5668 sgd = fluid.optimizer.SGD(learning_rate=1e-3) sgd.minimize(avg_cost) ### \u589e\u52a0\u9650\u5236\u6761\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\u5219\u8fdb\u884c\u65e0\u9650\u5236\u641c\u7d22 if flops(train_program) > max_flops: continue ### \u5b9a\u4e49\u4ee3\u7801\u662f\u5728cpu\u4e0a\u8fd0\u884c place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(startup_program) ### \u5b9a\u4e49\u8bad\u7ec3\u8f93\u5165\u6570\u636e train_reader = paddle.batch( paddle.reader.shuffle( paddle.dataset.cifar.train10(cycle=False), buf_size=1024), batch_size=batch_size, drop_last=True) ### \u5b9a\u4e49\u9884\u6d4b\u8f93\u5165\u6570\u636e test_reader = paddle.batch( paddle.dataset.cifar.test10(cycle=False), batch_size=batch_size, drop_last=False) train_feeder = fluid.DataFeeder([image, label], place, program=train_program) test_feeder = fluid.DataFeeder([image, label], place, program=test_program) ### \u5f00\u59cb\u8bad\u7ec3\uff0c\u6bcf\u4e2a\u641c\u7d22\u7ed3\u679c\u8bad\u7ec35\u4e2aepoch for epoch_id in range(5): for batch_id, data in enumerate(train_reader()): fetches = [avg_cost.name] outs = exe.run(train_program, feed=train_feeder.feed(data), fetch_list=fetches)[0] if batch_id % 10 == 0: print('TRAIN: steps: {}, epoch: {}, batch: {}, cost: {}'.format(step, epoch_id, batch_id, outs[0])) ### \u5f00\u59cb\u9884\u6d4b\uff0c\u5f97\u5230\u6700\u7ec8\u7684\u6d4b\u8bd5\u7ed3\u679c\u4f5c\u4e3ascore\u56de\u4f20\u7ed9sa_nas reward = [] for batch_id, data in enumerate(test_reader()): test_fetches = [ avg_cost.name, acc_top1.name ] batch_reward = exe.run(test_program, feed=test_feeder.feed(data), fetch_list=test_fetches) reward_avg = np.mean(np.array(batch_reward), axis=1) reward.append(reward_avg) print('TEST: step: {}, batch: {}, avg_cost: {}, acc_top1: {}'. format(step, batch_id, batch_reward[0],batch_reward[1])) finally_reward = np.mean(np.array(reward), axis=0) print( 'FINAL TEST: avg_cost: {}, acc_top1: {}'.format( finally_reward[0], finally_reward[1])) ### \u56de\u4f20score sa_nas.reward(float(finally_reward[1]))","title":"class SANAS"},{"location":"docs/api/prune_api/","text":"\u5377\u79ef\u901a\u9053\u526a\u88c1API\u6587\u6863 class Pruner paddleslim.prune.Pruner(criterion=\"l1_norm\") \u6e90\u4ee3\u7801 \u5bf9\u5377\u79ef\u7f51\u7edc\u7684\u901a\u9053\u8fdb\u884c\u4e00\u6b21\u526a\u88c1\u3002\u526a\u88c1\u4e00\u4e2a\u5377\u79ef\u5c42\u7684\u901a\u9053\uff0c\u662f\u6307\u526a\u88c1\u8be5\u5377\u79ef\u5c42\u8f93\u51fa\u7684\u901a\u9053\u3002\u5377\u79ef\u5c42\u7684\u6743\u91cd\u5f62\u72b6\u4e3a [output_channel, input_channel, kernel_size, kernel_size] \uff0c\u901a\u8fc7\u526a\u88c1\u8be5\u6743\u91cd\u7684\u7b2c\u4e00\u7eac\u5ea6\u8fbe\u5230\u526a\u88c1\u8f93\u51fa\u901a\u9053\u6570\u7684\u76ee\u7684\u3002 \u53c2\u6570\uff1a criterion: \u8bc4\u4f30\u4e00\u4e2a\u5377\u79ef\u5c42\u5185\u901a\u9053\u91cd\u8981\u6027\u6240\u53c2\u8003\u7684\u6307\u6807\u3002\u76ee\u524d\u4ec5\u652f\u6301 l1_norm \u3002\u9ed8\u8ba4\u4e3a l1_norm \u3002 \u8fd4\u56de\uff1a \u4e00\u4e2aPruner\u7c7b\u7684\u5b9e\u4f8b \u793a\u4f8b\u4ee3\u7801\uff1a from paddleslim.prune import Pruner pruner = Pruner() prune(program, scope, params, ratios, place=None, lazy=False, only_graph=False, param_backup=False, param_shape_backup=False) \u5bf9\u76ee\u6807\u7f51\u7edc\u7684\u4e00\u7ec4\u5377\u79ef\u5c42\u7684\u6743\u91cd\u8fdb\u884c\u88c1\u526a\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u8981\u88c1\u526a\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 scope(paddle.fluid.Scope): \u8981\u88c1\u526a\u7684\u6743\u91cd\u6240\u5728\u7684 scope \uff0cPaddle\u4e2d\u7528 scope \u5b9e\u4f8b\u5b58\u653e\u6a21\u578b\u53c2\u6570\u548c\u8fd0\u884c\u65f6\u53d8\u91cf\u7684\u503c\u3002Scope\u4e2d\u7684\u53c2\u6570\u503c\u4f1a\u88ab inplace \u7684\u88c1\u526a\u3002\u66f4\u591a\u4ecb\u7ecd\u8bf7\u53c2\u8003 Scope\u6982\u5ff5\u4ecb\u7ecd params(list ): \u9700\u8981\u88ab\u88c1\u526a\u7684\u5377\u79ef\u5c42\u7684\u53c2\u6570\u7684\u540d\u79f0\u5217\u8868\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b\u6a21\u578b\u4e2d\u6240\u6709\u53c2\u6570\u7684\u540d\u79f0: for block in program.blocks: for param in block.all_parameters(): print(\"param: {}; shape: {}\".format(param.name, param.shape)) ratios(list ): \u7528\u4e8e\u88c1\u526a params \u7684\u526a\u5207\u7387\uff0c\u7c7b\u578b\u4e3a\u5217\u8868\u3002\u8be5\u5217\u8868\u957f\u5ea6\u5fc5\u987b\u4e0e params \u7684\u957f\u5ea6\u4e00\u81f4\u3002 place(paddle.fluid.Place): \u5f85\u88c1\u526a\u53c2\u6570\u6240\u5728\u7684\u8bbe\u5907\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u662f CUDAPlace \u6216 CPUPlace \u3002 Place\u6982\u5ff5\u4ecb\u7ecd lazy(bool): lazy \u4e3aTrue\u65f6\uff0c\u901a\u8fc7\u5c06\u6307\u5b9a\u901a\u9053\u7684\u53c2\u6570\u7f6e\u96f6\u8fbe\u5230\u88c1\u526a\u7684\u76ee\u7684\uff0c\u53c2\u6570\u7684 shape\u4fdd\u6301\u4e0d\u53d8 \uff1b lazy \u4e3aFalse\u65f6\uff0c\u76f4\u63a5\u5c06\u8981\u88c1\u7684\u901a\u9053\u7684\u53c2\u6570\u5220\u9664\uff0c\u53c2\u6570\u7684 shape \u4f1a\u53d1\u751f\u53d8\u5316\u3002 only_graph(bool): \u662f\u5426\u53ea\u88c1\u526a\u7f51\u7edc\u7ed3\u6784\u3002\u5728Paddle\u4e2d\uff0cProgram\u5b9a\u4e49\u4e86\u7f51\u7edc\u7ed3\u6784\uff0cScope\u5b58\u50a8\u53c2\u6570\u7684\u6570\u503c\u3002\u4e00\u4e2aScope\u5b9e\u4f8b\u53ef\u4ee5\u88ab\u591a\u4e2aProgram\u4f7f\u7528\uff0c\u6bd4\u5982\u5b9a\u4e49\u4e86\u8bad\u7ec3\u7f51\u7edc\u7684Program\u548c\u5b9a\u4e49\u4e86\u6d4b\u8bd5\u7f51\u7edc\u7684Program\u662f\u4f7f\u7528\u540c\u4e00\u4e2aScope\u5b9e\u4f8b\u7684\u3002 only_graph \u4e3aTrue\u65f6\uff0c\u53ea\u5bf9Program\u4e2d\u5b9a\u4e49\u7684\u5377\u79ef\u7684\u901a\u9053\u8fdb\u884c\u526a\u88c1\uff1b only_graph \u4e3afalse\u65f6\uff0cScope\u4e2d\u5377\u79ef\u53c2\u6570\u7684\u6570\u503c\u4e5f\u4f1a\u88ab\u526a\u88c1\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 param_backup(bool): \u662f\u5426\u8fd4\u56de\u5bf9\u53c2\u6570\u503c\u7684\u5907\u4efd\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 param_shape_backup(bool): \u662f\u5426\u8fd4\u56de\u5bf9\u53c2\u6570 shape \u7684\u5907\u4efd\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 \u8fd4\u56de\uff1a pruned_program(paddle.fluid.Program): \u88ab\u88c1\u526a\u540e\u7684Program\u3002 param_backup(dict): \u5bf9\u53c2\u6570\u6570\u503c\u7684\u5907\u4efd\uff0c\u7528\u4e8e\u6062\u590dScope\u4e2d\u7684\u53c2\u6570\u6570\u503c\u3002 param_shape_backup(dict): \u5bf9\u53c2\u6570\u5f62\u72b6\u7684\u5907\u4efd\u3002 \u793a\u4f8b\uff1a \u70b9\u51fb AIStudio \u6267\u884c\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\u3002 import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.prune import Pruner def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_bn_layer(input, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") place = fluid.CPUPlace() exe = fluid.Executor(place) scope = fluid.Scope() exe.run(startup_program, scope=scope) pruner = Pruner() main_program, _, _ = pruner.prune( main_program, scope, params=[\"conv4_weights\"], ratios=[0.5], place=place, lazy=False, only_graph=False, param_backup=False, param_shape_backup=False) for param in main_program.global_block().all_parameters(): if \"weights\" in param.name: print(\"param name: {}; param shape: {}\".format(param.name, param.shape)) sensitivity paddleslim.prune.sensitivity(program, place, param_names, eval_func, sensitivities_file=None, pruned_ratios=None) \u6e90\u4ee3\u7801 \u8ba1\u7b97\u7f51\u7edc\u4e2d\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684\u654f\u611f\u5ea6\u3002\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u7edf\u8ba1\u65b9\u6cd5\u4e3a\uff1a\u4f9d\u6b21\u526a\u6389\u5f53\u524d\u5377\u79ef\u5c42\u4e0d\u540c\u6bd4\u4f8b\u7684\u8f93\u51fa\u901a\u9053\u6570\uff0c\u5728\u6d4b\u8bd5\u96c6\u4e0a\u8ba1\u7b97\u526a\u88c1\u540e\u7684\u7cbe\u5ea6\u635f\u5931\u3002\u5f97\u5230\u654f\u611f\u5ea6\u4fe1\u606f\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u89c2\u5bdf\u6216\u5176\u5b83\u65b9\u5f0f\u786e\u5b9a\u6bcf\u5c42\u5377\u79ef\u7684\u526a\u88c1\u7387\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u8bc4\u4f30\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 place(paddle.fluid.Place): \u5f85\u5206\u6790\u7684\u53c2\u6570\u6240\u5728\u7684\u8bbe\u5907\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u662f CUDAPlace \u6216 CPUPlace \u3002 Place\u6982\u5ff5\u4ecb\u7ecd param_names(list ): \u5f85\u5206\u6790\u7684\u5377\u79ef\u5c42\u7684\u53c2\u6570\u7684\u540d\u79f0\u5217\u8868\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b\u6a21\u578b\u4e2d\u6240\u6709\u53c2\u6570\u7684\u540d\u79f0: for block in program.blocks: for param in block.all_parameters(): print(\"param: {}; shape: {}\".format(param.name, param.shape)) eval_func(function): \u7528\u4e8e\u8bc4\u4f30\u88c1\u526a\u540e\u6a21\u578b\u6548\u679c\u7684\u56de\u8c03\u51fd\u6570\u3002\u8be5\u56de\u8c03\u51fd\u6570\u63a5\u53d7\u88ab\u88c1\u526a\u540e\u7684 program \u4e3a\u53c2\u6570\uff0c\u8fd4\u56de\u4e00\u4e2a\u8868\u793a\u5f53\u524dprogram\u7684\u7cbe\u5ea6\uff0c\u7528\u4ee5\u8ba1\u7b97\u5f53\u524d\u88c1\u526a\u5e26\u6765\u7684\u7cbe\u5ea6\u635f\u5931\u3002 sensitivities_file(str): \u4fdd\u5b58\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u7684\u6587\u4ef6\u3002\u5728\u654f\u611f\u5ea6\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u6301\u7eed\u5c06\u65b0\u8ba1\u7b97\u51fa\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u8ffd\u52a0\u5230\u8be5\u6587\u4ef6\u4e2d\u3002\u91cd\u542f\u4efb\u52a1\u540e\uff0c\u6587\u4ef6\u4e2d\u5df2\u6709\u654f\u611f\u5ea6\u4fe1\u606f\u4e0d\u4f1a\u88ab\u91cd\u590d\u8ba1\u7b97\u3002\u8be5\u6587\u4ef6\u53ef\u4ee5\u7528 pickle \u52a0\u8f7d\u3002 pruned_ratios(list ): \u8ba1\u7b97\u5377\u79ef\u5c42\u654f\u611f\u5ea6\u4fe1\u606f\u65f6\uff0c\u4f9d\u6b21\u526a\u6389\u7684\u901a\u9053\u6570\u6bd4\u4f8b\u3002\u9ed8\u8ba4\u4e3a[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]\u3002 \u8fd4\u56de\uff1a sensitivities(dict): \u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684dict\uff0c\u5176\u683c\u5f0f\u4e3a\uff1a {\"weight_0\": {0.1: 0.22, 0.2: 0.33 }, \"weight_1\": {0.1: 0.21, 0.2: 0.4 } } \u5176\u4e2d\uff0c weight_0 \u662f\u5377\u79ef\u5c42\u53c2\u6570\u7684\u540d\u79f0\uff0csensitivities['weight_0']\u7684 value \u4e3a\u526a\u88c1\u6bd4\u4f8b\uff0c value \u4e3a\u7cbe\u5ea6\u635f\u5931\u7684\u6bd4\u4f8b\u3002 \u793a\u4f8b\uff1a \u70b9\u51fb AIStudio \u8fd0\u884c\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\u3002 import paddle import numpy as np import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.prune import sensitivity import paddle.dataset.mnist as reader def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels image_shape = [1,28,28] with fluid.program_guard(main_program, startup_program): image = fluid.data(name='image', shape=[None]+image_shape, dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') conv1 = conv_bn_layer(image, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") out = fluid.layers.fc(conv6, size=10, act=\"softmax\") # cost = fluid.layers.cross_entropy(input=out, label=label) # avg_cost = fluid.layers.mean(x=cost) acc_top1 = fluid.layers.accuracy(input=out, label=label, k=1) # acc_top5 = fluid.layers.accuracy(input=out, label=label, k=5) place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(startup_program) val_reader = paddle.batch(reader.test(), batch_size=128) val_feeder = feeder = fluid.DataFeeder( [image, label], place, program=main_program) def eval_func(program): acc_top1_ns = [] for data in val_reader(): acc_top1_n = exe.run(program, feed=val_feeder.feed(data), fetch_list=[acc_top1.name]) acc_top1_ns.append(np.mean(acc_top1_n)) return np.mean(acc_top1_ns) param_names = [] for param in main_program.global_block().all_parameters(): if \"weights\" in param.name: param_names.append(param.name) sensitivities = sensitivity(main_program, place, param_names, eval_func, sensitivities_file=\"./sensitive.data\", pruned_ratios=[0.1, 0.2, 0.3]) print(sensitivities) merge_sensitive merge_sensitive(sensitivities) \u5408\u5e76\u591a\u4e2a\u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u53c2\u6570\uff1a sensitivities(list | list ): \u5f85\u5408\u5e76\u7684\u654f\u611f\u5ea6\u4fe1\u606f\uff0c\u53ef\u4ee5\u662f\u5b57\u5178\u7684\u5217\u8868\uff0c\u6216\u8005\u662f\u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u6587\u4ef6\u7684\u8def\u5f84\u5217\u8868\u3002 \u8fd4\u56de\uff1a sensitivities(dict)\uff1a \u5408\u5e76\u540e\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u3002\u5176\u683c\u5f0f\u4e3a\uff1a {\"weight_0\": {0.1: 0.22, 0.2: 0.33 }, \"weight_1\": {0.1: 0.21, 0.2: 0.4 } } \u5176\u4e2d\uff0c weight_0 \u662f\u5377\u79ef\u5c42\u53c2\u6570\u7684\u540d\u79f0\uff0csensitivities['weight_0']\u7684 value \u4e3a\u526a\u88c1\u6bd4\u4f8b\uff0c value \u4e3a\u7cbe\u5ea6\u635f\u5931\u7684\u6bd4\u4f8b\u3002 \u793a\u4f8b\uff1a load_sensitivities load_sensitivities(sensitivities_file) \u4ece\u6587\u4ef6\u4e2d\u52a0\u8f7d\u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u53c2\u6570\uff1a sensitivities_file(str): \u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u672c\u5730\u6587\u4ef6. \u8fd4\u56de\uff1a sensitivities(dict) \u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u793a\u4f8b\uff1a get_ratios_by_loss(sensitivities, loss) \u6839\u636e\u654f\u611f\u5ea6\u548c\u7cbe\u5ea6\u635f\u5931\u9608\u503c\u8ba1\u7b97\u51fa\u4e00\u7ec4\u526a\u5207\u7387\u3002\u5bf9\u4e8e\u53c2\u6570 w , \u5176\u526a\u88c1\u7387\u4e3a\u4f7f\u7cbe\u5ea6\u635f\u5931\u4f4e\u4e8e loss \u7684\u6700\u5927\u526a\u88c1\u7387\u3002 \u53c2\u6570\uff1a sensitivities(dict): \u654f\u611f\u5ea6\u4fe1\u606f\u3002 loss: \u7cbe\u5ea6\u635f\u5931\u9608\u503c\u3002 \u8fd4\u56de\uff1a ratios(dict): \u4e00\u7ec4\u526a\u5207\u7387\u3002 key \u662f\u5f85\u526a\u88c1\u53c2\u6570\u7684\u540d\u79f0\u3002 value \u662f\u5bf9\u5e94\u53c2\u6570\u7684\u526a\u88c1\u7387\u3002 \u793a\u4f8b\uff1a","title":"\u5377\u79ef\u901a\u9053\u526a\u88c1API\u6587\u6863"},{"location":"docs/api/prune_api/#api","text":"","title":"\u5377\u79ef\u901a\u9053\u526a\u88c1API\u6587\u6863"},{"location":"docs/api/prune_api/#class-pruner","text":"paddleslim.prune.Pruner(criterion=\"l1_norm\") \u6e90\u4ee3\u7801 \u5bf9\u5377\u79ef\u7f51\u7edc\u7684\u901a\u9053\u8fdb\u884c\u4e00\u6b21\u526a\u88c1\u3002\u526a\u88c1\u4e00\u4e2a\u5377\u79ef\u5c42\u7684\u901a\u9053\uff0c\u662f\u6307\u526a\u88c1\u8be5\u5377\u79ef\u5c42\u8f93\u51fa\u7684\u901a\u9053\u3002\u5377\u79ef\u5c42\u7684\u6743\u91cd\u5f62\u72b6\u4e3a [output_channel, input_channel, kernel_size, kernel_size] \uff0c\u901a\u8fc7\u526a\u88c1\u8be5\u6743\u91cd\u7684\u7b2c\u4e00\u7eac\u5ea6\u8fbe\u5230\u526a\u88c1\u8f93\u51fa\u901a\u9053\u6570\u7684\u76ee\u7684\u3002 \u53c2\u6570\uff1a criterion: \u8bc4\u4f30\u4e00\u4e2a\u5377\u79ef\u5c42\u5185\u901a\u9053\u91cd\u8981\u6027\u6240\u53c2\u8003\u7684\u6307\u6807\u3002\u76ee\u524d\u4ec5\u652f\u6301 l1_norm \u3002\u9ed8\u8ba4\u4e3a l1_norm \u3002 \u8fd4\u56de\uff1a \u4e00\u4e2aPruner\u7c7b\u7684\u5b9e\u4f8b \u793a\u4f8b\u4ee3\u7801\uff1a from paddleslim.prune import Pruner pruner = Pruner() prune(program, scope, params, ratios, place=None, lazy=False, only_graph=False, param_backup=False, param_shape_backup=False) \u5bf9\u76ee\u6807\u7f51\u7edc\u7684\u4e00\u7ec4\u5377\u79ef\u5c42\u7684\u6743\u91cd\u8fdb\u884c\u88c1\u526a\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u8981\u88c1\u526a\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 scope(paddle.fluid.Scope): \u8981\u88c1\u526a\u7684\u6743\u91cd\u6240\u5728\u7684 scope \uff0cPaddle\u4e2d\u7528 scope \u5b9e\u4f8b\u5b58\u653e\u6a21\u578b\u53c2\u6570\u548c\u8fd0\u884c\u65f6\u53d8\u91cf\u7684\u503c\u3002Scope\u4e2d\u7684\u53c2\u6570\u503c\u4f1a\u88ab inplace \u7684\u88c1\u526a\u3002\u66f4\u591a\u4ecb\u7ecd\u8bf7\u53c2\u8003 Scope\u6982\u5ff5\u4ecb\u7ecd params(list ): \u9700\u8981\u88ab\u88c1\u526a\u7684\u5377\u79ef\u5c42\u7684\u53c2\u6570\u7684\u540d\u79f0\u5217\u8868\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b\u6a21\u578b\u4e2d\u6240\u6709\u53c2\u6570\u7684\u540d\u79f0: for block in program.blocks: for param in block.all_parameters(): print(\"param: {}; shape: {}\".format(param.name, param.shape)) ratios(list ): \u7528\u4e8e\u88c1\u526a params \u7684\u526a\u5207\u7387\uff0c\u7c7b\u578b\u4e3a\u5217\u8868\u3002\u8be5\u5217\u8868\u957f\u5ea6\u5fc5\u987b\u4e0e params \u7684\u957f\u5ea6\u4e00\u81f4\u3002 place(paddle.fluid.Place): \u5f85\u88c1\u526a\u53c2\u6570\u6240\u5728\u7684\u8bbe\u5907\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u662f CUDAPlace \u6216 CPUPlace \u3002 Place\u6982\u5ff5\u4ecb\u7ecd lazy(bool): lazy \u4e3aTrue\u65f6\uff0c\u901a\u8fc7\u5c06\u6307\u5b9a\u901a\u9053\u7684\u53c2\u6570\u7f6e\u96f6\u8fbe\u5230\u88c1\u526a\u7684\u76ee\u7684\uff0c\u53c2\u6570\u7684 shape\u4fdd\u6301\u4e0d\u53d8 \uff1b lazy \u4e3aFalse\u65f6\uff0c\u76f4\u63a5\u5c06\u8981\u88c1\u7684\u901a\u9053\u7684\u53c2\u6570\u5220\u9664\uff0c\u53c2\u6570\u7684 shape \u4f1a\u53d1\u751f\u53d8\u5316\u3002 only_graph(bool): \u662f\u5426\u53ea\u88c1\u526a\u7f51\u7edc\u7ed3\u6784\u3002\u5728Paddle\u4e2d\uff0cProgram\u5b9a\u4e49\u4e86\u7f51\u7edc\u7ed3\u6784\uff0cScope\u5b58\u50a8\u53c2\u6570\u7684\u6570\u503c\u3002\u4e00\u4e2aScope\u5b9e\u4f8b\u53ef\u4ee5\u88ab\u591a\u4e2aProgram\u4f7f\u7528\uff0c\u6bd4\u5982\u5b9a\u4e49\u4e86\u8bad\u7ec3\u7f51\u7edc\u7684Program\u548c\u5b9a\u4e49\u4e86\u6d4b\u8bd5\u7f51\u7edc\u7684Program\u662f\u4f7f\u7528\u540c\u4e00\u4e2aScope\u5b9e\u4f8b\u7684\u3002 only_graph \u4e3aTrue\u65f6\uff0c\u53ea\u5bf9Program\u4e2d\u5b9a\u4e49\u7684\u5377\u79ef\u7684\u901a\u9053\u8fdb\u884c\u526a\u88c1\uff1b only_graph \u4e3afalse\u65f6\uff0cScope\u4e2d\u5377\u79ef\u53c2\u6570\u7684\u6570\u503c\u4e5f\u4f1a\u88ab\u526a\u88c1\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 param_backup(bool): \u662f\u5426\u8fd4\u56de\u5bf9\u53c2\u6570\u503c\u7684\u5907\u4efd\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 param_shape_backup(bool): \u662f\u5426\u8fd4\u56de\u5bf9\u53c2\u6570 shape \u7684\u5907\u4efd\u3002\u9ed8\u8ba4\u4e3aFalse\u3002 \u8fd4\u56de\uff1a pruned_program(paddle.fluid.Program): \u88ab\u88c1\u526a\u540e\u7684Program\u3002 param_backup(dict): \u5bf9\u53c2\u6570\u6570\u503c\u7684\u5907\u4efd\uff0c\u7528\u4e8e\u6062\u590dScope\u4e2d\u7684\u53c2\u6570\u6570\u503c\u3002 param_shape_backup(dict): \u5bf9\u53c2\u6570\u5f62\u72b6\u7684\u5907\u4efd\u3002 \u793a\u4f8b\uff1a \u70b9\u51fb AIStudio \u6267\u884c\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\u3002 import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.prune import Pruner def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels with fluid.program_guard(main_program, startup_program): input = fluid.data(name=\"image\", shape=[None, 3, 16, 16]) conv1 = conv_bn_layer(input, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") place = fluid.CPUPlace() exe = fluid.Executor(place) scope = fluid.Scope() exe.run(startup_program, scope=scope) pruner = Pruner() main_program, _, _ = pruner.prune( main_program, scope, params=[\"conv4_weights\"], ratios=[0.5], place=place, lazy=False, only_graph=False, param_backup=False, param_shape_backup=False) for param in main_program.global_block().all_parameters(): if \"weights\" in param.name: print(\"param name: {}; param shape: {}\".format(param.name, param.shape))","title":"class Pruner"},{"location":"docs/api/prune_api/#sensitivity","text":"paddleslim.prune.sensitivity(program, place, param_names, eval_func, sensitivities_file=None, pruned_ratios=None) \u6e90\u4ee3\u7801 \u8ba1\u7b97\u7f51\u7edc\u4e2d\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684\u654f\u611f\u5ea6\u3002\u6bcf\u4e2a\u5377\u79ef\u5c42\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u7edf\u8ba1\u65b9\u6cd5\u4e3a\uff1a\u4f9d\u6b21\u526a\u6389\u5f53\u524d\u5377\u79ef\u5c42\u4e0d\u540c\u6bd4\u4f8b\u7684\u8f93\u51fa\u901a\u9053\u6570\uff0c\u5728\u6d4b\u8bd5\u96c6\u4e0a\u8ba1\u7b97\u526a\u88c1\u540e\u7684\u7cbe\u5ea6\u635f\u5931\u3002\u5f97\u5230\u654f\u611f\u5ea6\u4fe1\u606f\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u89c2\u5bdf\u6216\u5176\u5b83\u65b9\u5f0f\u786e\u5b9a\u6bcf\u5c42\u5377\u79ef\u7684\u526a\u88c1\u7387\u3002 \u53c2\u6570\uff1a program(paddle.fluid.Program): \u5f85\u8bc4\u4f30\u7684\u76ee\u6807\u7f51\u7edc\u3002\u66f4\u591a\u5173\u4e8eProgram\u7684\u4ecb\u7ecd\u8bf7\u53c2\u8003\uff1a Program\u6982\u5ff5\u4ecb\u7ecd \u3002 place(paddle.fluid.Place): \u5f85\u5206\u6790\u7684\u53c2\u6570\u6240\u5728\u7684\u8bbe\u5907\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u662f CUDAPlace \u6216 CPUPlace \u3002 Place\u6982\u5ff5\u4ecb\u7ecd param_names(list ): \u5f85\u5206\u6790\u7684\u5377\u79ef\u5c42\u7684\u53c2\u6570\u7684\u540d\u79f0\u5217\u8868\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b\u6a21\u578b\u4e2d\u6240\u6709\u53c2\u6570\u7684\u540d\u79f0: for block in program.blocks: for param in block.all_parameters(): print(\"param: {}; shape: {}\".format(param.name, param.shape)) eval_func(function): \u7528\u4e8e\u8bc4\u4f30\u88c1\u526a\u540e\u6a21\u578b\u6548\u679c\u7684\u56de\u8c03\u51fd\u6570\u3002\u8be5\u56de\u8c03\u51fd\u6570\u63a5\u53d7\u88ab\u88c1\u526a\u540e\u7684 program \u4e3a\u53c2\u6570\uff0c\u8fd4\u56de\u4e00\u4e2a\u8868\u793a\u5f53\u524dprogram\u7684\u7cbe\u5ea6\uff0c\u7528\u4ee5\u8ba1\u7b97\u5f53\u524d\u88c1\u526a\u5e26\u6765\u7684\u7cbe\u5ea6\u635f\u5931\u3002 sensitivities_file(str): \u4fdd\u5b58\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u7684\u6587\u4ef6\u3002\u5728\u654f\u611f\u5ea6\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u6301\u7eed\u5c06\u65b0\u8ba1\u7b97\u51fa\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u8ffd\u52a0\u5230\u8be5\u6587\u4ef6\u4e2d\u3002\u91cd\u542f\u4efb\u52a1\u540e\uff0c\u6587\u4ef6\u4e2d\u5df2\u6709\u654f\u611f\u5ea6\u4fe1\u606f\u4e0d\u4f1a\u88ab\u91cd\u590d\u8ba1\u7b97\u3002\u8be5\u6587\u4ef6\u53ef\u4ee5\u7528 pickle \u52a0\u8f7d\u3002 pruned_ratios(list ): \u8ba1\u7b97\u5377\u79ef\u5c42\u654f\u611f\u5ea6\u4fe1\u606f\u65f6\uff0c\u4f9d\u6b21\u526a\u6389\u7684\u901a\u9053\u6570\u6bd4\u4f8b\u3002\u9ed8\u8ba4\u4e3a[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]\u3002 \u8fd4\u56de\uff1a sensitivities(dict): \u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684dict\uff0c\u5176\u683c\u5f0f\u4e3a\uff1a {\"weight_0\": {0.1: 0.22, 0.2: 0.33 }, \"weight_1\": {0.1: 0.21, 0.2: 0.4 } } \u5176\u4e2d\uff0c weight_0 \u662f\u5377\u79ef\u5c42\u53c2\u6570\u7684\u540d\u79f0\uff0csensitivities['weight_0']\u7684 value \u4e3a\u526a\u88c1\u6bd4\u4f8b\uff0c value \u4e3a\u7cbe\u5ea6\u635f\u5931\u7684\u6bd4\u4f8b\u3002 \u793a\u4f8b\uff1a \u70b9\u51fb AIStudio \u8fd0\u884c\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\u3002 import paddle import numpy as np import paddle.fluid as fluid from paddle.fluid.param_attr import ParamAttr from paddleslim.prune import sensitivity import paddle.dataset.mnist as reader def conv_bn_layer(input, num_filters, filter_size, name, stride=1, groups=1, act=None): conv = fluid.layers.conv2d( input=input, num_filters=num_filters, filter_size=filter_size, stride=stride, padding=(filter_size - 1) // 2, groups=groups, act=None, param_attr=ParamAttr(name=name + \"_weights\"), bias_attr=False, name=name + \"_out\") bn_name = name + \"_bn\" return fluid.layers.batch_norm( input=conv, act=act, name=bn_name + '_output', param_attr=ParamAttr(name=bn_name + '_scale'), bias_attr=ParamAttr(bn_name + '_offset'), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance', ) main_program = fluid.Program() startup_program = fluid.Program() # X X O X O # conv1-->conv2-->sum1-->conv3-->conv4-->sum2-->conv5-->conv6 # | ^ | ^ # |____________| |____________________| # # X: prune output channels # O: prune input channels image_shape = [1,28,28] with fluid.program_guard(main_program, startup_program): image = fluid.data(name='image', shape=[None]+image_shape, dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') conv1 = conv_bn_layer(image, 8, 3, \"conv1\") conv2 = conv_bn_layer(conv1, 8, 3, \"conv2\") sum1 = conv1 + conv2 conv3 = conv_bn_layer(sum1, 8, 3, \"conv3\") conv4 = conv_bn_layer(conv3, 8, 3, \"conv4\") sum2 = conv4 + sum1 conv5 = conv_bn_layer(sum2, 8, 3, \"conv5\") conv6 = conv_bn_layer(conv5, 8, 3, \"conv6\") out = fluid.layers.fc(conv6, size=10, act=\"softmax\") # cost = fluid.layers.cross_entropy(input=out, label=label) # avg_cost = fluid.layers.mean(x=cost) acc_top1 = fluid.layers.accuracy(input=out, label=label, k=1) # acc_top5 = fluid.layers.accuracy(input=out, label=label, k=5) place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(startup_program) val_reader = paddle.batch(reader.test(), batch_size=128) val_feeder = feeder = fluid.DataFeeder( [image, label], place, program=main_program) def eval_func(program): acc_top1_ns = [] for data in val_reader(): acc_top1_n = exe.run(program, feed=val_feeder.feed(data), fetch_list=[acc_top1.name]) acc_top1_ns.append(np.mean(acc_top1_n)) return np.mean(acc_top1_ns) param_names = [] for param in main_program.global_block().all_parameters(): if \"weights\" in param.name: param_names.append(param.name) sensitivities = sensitivity(main_program, place, param_names, eval_func, sensitivities_file=\"./sensitive.data\", pruned_ratios=[0.1, 0.2, 0.3]) print(sensitivities)","title":"sensitivity"},{"location":"docs/api/prune_api/#merge_sensitive","text":"merge_sensitive(sensitivities) \u5408\u5e76\u591a\u4e2a\u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u53c2\u6570\uff1a sensitivities(list | list ): \u5f85\u5408\u5e76\u7684\u654f\u611f\u5ea6\u4fe1\u606f\uff0c\u53ef\u4ee5\u662f\u5b57\u5178\u7684\u5217\u8868\uff0c\u6216\u8005\u662f\u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u6587\u4ef6\u7684\u8def\u5f84\u5217\u8868\u3002 \u8fd4\u56de\uff1a sensitivities(dict)\uff1a \u5408\u5e76\u540e\u7684\u654f\u611f\u5ea6\u4fe1\u606f\u3002\u5176\u683c\u5f0f\u4e3a\uff1a {\"weight_0\": {0.1: 0.22, 0.2: 0.33 }, \"weight_1\": {0.1: 0.21, 0.2: 0.4 } } \u5176\u4e2d\uff0c weight_0 \u662f\u5377\u79ef\u5c42\u53c2\u6570\u7684\u540d\u79f0\uff0csensitivities['weight_0']\u7684 value \u4e3a\u526a\u88c1\u6bd4\u4f8b\uff0c value \u4e3a\u7cbe\u5ea6\u635f\u5931\u7684\u6bd4\u4f8b\u3002 \u793a\u4f8b\uff1a","title":"merge_sensitive"},{"location":"docs/api/prune_api/#load_sensitivities","text":"load_sensitivities(sensitivities_file) \u4ece\u6587\u4ef6\u4e2d\u52a0\u8f7d\u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u53c2\u6570\uff1a sensitivities_file(str): \u5b58\u653e\u654f\u611f\u5ea6\u4fe1\u606f\u7684\u672c\u5730\u6587\u4ef6. \u8fd4\u56de\uff1a sensitivities(dict) \u654f\u611f\u5ea6\u4fe1\u606f\u3002 \u793a\u4f8b\uff1a","title":"load_sensitivities"},{"location":"docs/api/prune_api/#get_ratios_by_losssensitivities-loss","text":"\u6839\u636e\u654f\u611f\u5ea6\u548c\u7cbe\u5ea6\u635f\u5931\u9608\u503c\u8ba1\u7b97\u51fa\u4e00\u7ec4\u526a\u5207\u7387\u3002\u5bf9\u4e8e\u53c2\u6570 w , \u5176\u526a\u88c1\u7387\u4e3a\u4f7f\u7cbe\u5ea6\u635f\u5931\u4f4e\u4e8e loss \u7684\u6700\u5927\u526a\u88c1\u7387\u3002 \u53c2\u6570\uff1a sensitivities(dict): \u654f\u611f\u5ea6\u4fe1\u606f\u3002 loss: \u7cbe\u5ea6\u635f\u5931\u9608\u503c\u3002 \u8fd4\u56de\uff1a ratios(dict): \u4e00\u7ec4\u526a\u5207\u7387\u3002 key \u662f\u5f85\u526a\u88c1\u53c2\u6570\u7684\u540d\u79f0\u3002 value \u662f\u5bf9\u5e94\u53c2\u6570\u7684\u526a\u88c1\u7387\u3002 \u793a\u4f8b\uff1a","title":"get_ratios_by_loss(sensitivities, loss)"},{"location":"docs/api/quantization_api/","text":"paddleslim.quant API\u6587\u6863 \u91cf\u5316\u8bad\u7ec3API \u91cf\u5316\u914d\u7f6e quant_config_default = { 'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'abs_max', 'weight_bits': 8, 'activation_bits': 8, # ops of name_scope in not_quant_pattern list, will not be quantized 'not_quant_pattern': ['skip_quant'], # ops of type in quantize_op_types, will be quantized 'quantize_op_types': ['conv2d', 'depthwise_conv2d', 'mul', 'elementwise_add', 'pool2d'], # data type after quantization, such as 'uint8', 'int8', etc. default is 'int8' 'dtype': 'int8', # window size for 'range_abs_max' quantization. defaulf is 10000 'window_size': 10000, # The decay coefficient of moving average, default is 0.9 'moving_rate': 0.9, # if set quant_weight_only True, then only quantize parameters of layers which need to be quantized, # and activations will not be quantized. 'quant_weight_only': False } \u8bbe\u7f6e\u91cf\u5316\u8bad\u7ec3\u9700\u8981\u7684\u914d\u7f6e\u3002 \u53c2\u6570\uff1a weight_quantize_type(str) - \u53c2\u6570\u91cf\u5316\u65b9\u5f0f\u3002\u53ef\u9009 'abs_max' , 'channel_wise_abs_max' , 'range_abs_max' , 'moving_average_abs_max' \u3002 \u9ed8\u8ba4 'abs_max' \u3002 activation_quantize_type(str) - \u6fc0\u6d3b\u91cf\u5316\u65b9\u5f0f\uff0c\u53ef\u9009 'abs_max' , 'range_abs_max' , 'moving_average_abs_max' \uff0c\u9ed8\u8ba4 'abs_max' \u3002 weight_bits(int) - \u53c2\u6570\u91cf\u5316bit\u6570\uff0c\u9ed8\u8ba48, \u63a8\u8350\u8bbe\u4e3a8\u3002 activation_bits(int) - \u6fc0\u6d3b\u91cf\u5316bit\u6570\uff0c\u9ed8\u8ba48\uff0c \u63a8\u8350\u8bbe\u4e3a8\u3002 not_quant_pattern(str or list[str]) - \u6240\u6709 name_scope \u5305\u542b 'not_quant_pattern' \u5b57\u7b26\u4e32\u7684 op \uff0c\u90fd\u4e0d\u91cf\u5316, \u8bbe\u7f6e\u65b9\u5f0f\u8bf7\u53c2\u8003 fluid.name_scope() \u3002 quantize_op_types(list[str]) - \u9700\u8981\u8fdb\u884c\u91cf\u5316\u7684 op \u7c7b\u578b\uff0c\u76ee\u524d\u652f\u6301 'conv2d', 'depthwise_conv2d', 'mul' \u3002 dtype(int8) - \u91cf\u5316\u540e\u7684\u53c2\u6570\u7c7b\u578b\uff0c\u9ed8\u8ba4 int8 , \u76ee\u524d\u4ec5\u652f\u6301 int8 \u3002 window_size(int) - 'range_abs_max' \u91cf\u5316\u65b9\u5f0f\u7684 window size \uff0c\u9ed8\u8ba410000\u3002 moving_rate(int) - 'moving_average_abs_max' \u91cf\u5316\u65b9\u5f0f\u7684\u8870\u51cf\u7cfb\u6570\uff0c\u9ed8\u8ba4 0.9\u3002 quant_weight_only(bool) - \u662f\u5426\u53ea\u91cf\u5316\u53c2\u6570\uff0c\u5982\u679c\u8bbe\u4e3a True \uff0c\u5219\u6fc0\u6d3b\u4e0d\u8fdb\u884c\u91cf\u5316\uff0c\u9ed8\u8ba4 False \u3002\u76ee\u524d\u6682\u4e0d\u652f\u6301\u8bbe\u7f6e\u4e3a True \u3002 \u8bbe\u7f6e\u4e3a True \u65f6\uff0c\u53ea\u91cf\u5316\u53c2\u6570\uff0c\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u80fd\u51cf\u5c11\u663e\u5b58\u5360\u7528\u548c\u52a0\u901f\uff0c\u53ea\u80fd\u7528\u6765\u51cf\u5c11\u5e26\u5bbd\u3002 paddleslim.quant.quant_aware(program, place, config, scope=None, for_test=False) \u5728 program \u4e2d\u52a0\u5165\u91cf\u5316\u548c\u53cd\u91cf\u5316 op , \u7528\u4e8e\u91cf\u5316\u8bad\u7ec3\u3002 \u53c2\u6570\uff1a program (fluid.Program) - \u4f20\u5165\u8bad\u7ec3\u6216\u6d4b\u8bd5 program \u3002 place(fluid.CPUPlace or fluid.CUDAPlace) - \u8be5\u53c2\u6570\u8868\u793a Executor \u6267\u884c\u6240\u5728\u7684\u8bbe\u5907\u3002 config(dict) - \u91cf\u5316\u914d\u7f6e\u8868\u3002 scope(fluid.Scope, optional) - \u4f20\u5165\u7528\u4e8e\u5b58\u50a8 Variable \u7684 scope \uff0c\u9700\u8981\u4f20\u5165 program \u6240\u4f7f\u7528\u7684 scope \uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u662f fluid.global_scope() \u3002\u8bbe\u7f6e\u4e3a None \u65f6\u5c06\u4f7f\u7528 fluid.global_scope() \uff0c\u9ed8\u8ba4\u503c\u4e3a None \u3002 for_test(bool) - \u5982\u679c program \u53c2\u6570\u662f\u4e00\u4e2a\u6d4b\u8bd5 program \uff0c for_test \u5e94\u8bbe\u4e3a True \uff0c\u5426\u5219\u8bbe\u4e3a False \u3002 \u8fd4\u56de \u542b\u6709\u91cf\u5316\u548c\u53cd\u91cf\u5316 operator \u7684 program \u8fd4\u56de\u7c7b\u578b \u5f53 for_test=False \uff0c\u8fd4\u56de\u7c7b\u578b\u4e3a fluid.CompiledProgram \uff0c \u6ce8\u610f\uff0c\u6b64\u8fd4\u56de\u503c\u4e0d\u80fd\u7528\u4e8e\u4fdd\u5b58\u53c2\u6570 \u3002 \u5f53 for_test=True \uff0c\u8fd4\u56de\u7c7b\u578b\u4e3a fluid.Program \u3002 \u6ce8\u610f\u4e8b\u9879 \u6b64\u63a5\u53e3\u4f1a\u6539\u53d8 program \u7ed3\u6784\uff0c\u5e76\u4e14\u53ef\u80fd\u589e\u52a0\u4e00\u4e9b persistable \u7684\u53d8\u91cf\uff0c\u6240\u4ee5\u52a0\u8f7d\u6a21\u578b\u53c2\u6570\u65f6\u8bf7\u6ce8\u610f\u548c\u76f8\u5e94\u7684 program \u5bf9\u5e94\u3002 \u6b64\u63a5\u53e3\u5e95\u5c42\u7ecf\u5386\u4e86 fluid.Program -> fluid.framework.IrGraph -> fluid.Program \u7684\u8f6c\u53d8\uff0c\u5728 fluid.framework.IrGraph \u4e2d\u6ca1\u6709 Parameter \u7684\u6982\u5ff5\uff0c Variable \u53ea\u6709 persistable \u548c not persistable \u7684\u533a\u522b\uff0c\u6240\u4ee5\u5728\u4fdd\u5b58\u548c\u52a0\u8f7d\u53c2\u6570\u65f6\uff0c\u8bf7\u4f7f\u7528 fluid.io.save_persistables \u548c fluid.io.load_persistables \u63a5\u53e3\u3002 \u7531\u4e8e\u6b64\u63a5\u53e3\u4f1a\u6839\u636e program \u7684\u7ed3\u6784\u548c\u91cf\u5316\u914d\u7f6e\u6765\u5bf9 program \u6dfb\u52a0op\uff0c\u6240\u4ee5 Paddle \u4e2d\u4e00\u4e9b\u901a\u8fc7 fuse op \u6765\u52a0\u901f\u8bad\u7ec3\u7684\u7b56\u7565\u4e0d\u80fd\u4f7f\u7528\u3002\u5df2\u77e5\u4ee5\u4e0b\u7b56\u7565\u5728\u4f7f\u7528\u91cf\u5316\u65f6\u5fc5\u987b\u8bbe\u4e3a False \uff1a fuse_all_reduce_ops, sync_batch_norm \u3002 \u5982\u679c\u4f20\u5165\u7684 program \u4e2d\u5b58\u5728\u548c\u4efb\u4f55op\u90fd\u6ca1\u6709\u8fde\u63a5\u7684 Variable \uff0c\u5219\u4f1a\u5728\u91cf\u5316\u7684\u8fc7\u7a0b\u4e2d\u88ab\u4f18\u5316\u6389\u3002 paddleslim.quant.convert(program, place, config, scope=None, save_int8=False) \u628a\u8bad\u7ec3\u597d\u7684\u91cf\u5316 program \uff0c\u8f6c\u6362\u4e3a\u53ef\u7528\u4e8e\u4fdd\u5b58 inference model \u7684 program \u3002 \u53c2\u6570\uff1a - program (fluid.Program) - \u4f20\u5165\u6d4b\u8bd5 program \u3002 - place(fluid.CPUPlace or fluid.CUDAPlace) - \u8be5\u53c2\u6570\u8868\u793a Executor \u6267\u884c\u6240\u5728\u7684\u8bbe\u5907\u3002 - config(dict) - \u91cf\u5316\u914d\u7f6e\u8868\u3002 - scope(fluid.Scope) - \u4f20\u5165\u7528\u4e8e\u5b58\u50a8 Variable \u7684 scope \uff0c\u9700\u8981\u4f20\u5165 program \u6240\u4f7f\u7528\u7684 scope \uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u662f fluid.global_scope() \u3002\u8bbe\u7f6e\u4e3a None \u65f6\u5c06\u4f7f\u7528 fluid.global_scope() \uff0c\u9ed8\u8ba4\u503c\u4e3a None \u3002 - save_int8\uff08bool) - \u662f\u5426\u9700\u8981\u8fd4\u56de\u53c2\u6570\u4e3a int8 \u7684 program \u3002\u8be5\u529f\u80fd\u76ee\u524d\u53ea\u80fd\u7528\u4e8e\u786e\u8ba4\u6a21\u578b\u5927\u5c0f\u3002\u9ed8\u8ba4\u503c\u4e3a False \u3002 \u8fd4\u56de program (fluid.Program) - freezed program\uff0c\u53ef\u7528\u4e8e\u4fdd\u5b58inference model\uff0c\u53c2\u6570\u4e3a float32 \u7c7b\u578b\uff0c\u4f46\u5176\u6570\u503c\u8303\u56f4\u53ef\u7528int8\u8868\u793a\u3002 int8_program (fluid.Program) - freezed program\uff0c\u53ef\u7528\u4e8e\u4fdd\u5b58inference model\uff0c\u53c2\u6570\u4e3a int8 \u7c7b\u578b\u3002\u5f53 save_int8 \u4e3a False \u65f6\uff0c\u4e0d\u8fd4\u56de\u8be5\u503c\u3002 \u6ce8\u610f\u4e8b\u9879 \u56e0\u4e3a\u8be5\u63a5\u53e3\u4f1a\u5bf9 op \u548c Variable \u505a\u76f8\u5e94\u7684\u5220\u9664\u548c\u4fee\u6539\uff0c\u6240\u4ee5\u6b64\u63a5\u53e3\u53ea\u80fd\u5728\u8bad\u7ec3\u5b8c\u6210\u4e4b\u540e\u8c03\u7528\u3002\u5982\u679c\u60f3\u8f6c\u5316\u8bad\u7ec3\u7684\u4e2d\u95f4\u6a21\u578b\uff0c\u53ef\u52a0\u8f7d\u76f8\u5e94\u7684\u53c2\u6570\u4e4b\u540e\u518d\u4f7f\u7528\u6b64\u63a5\u53e3\u3002 \u4ee3\u7801\u793a\u4f8b #encoding=utf8 import paddle.fluid as fluid import paddleslim.quant as quant train_program = fluid.Program() with fluid.program_guard(train_program): image = fluid.data(name='x', shape=[None, 1, 28, 28]) label = fluid.data(name='label', shape=[None, 1], dtype='int64') conv = fluid.layers.conv2d(image, 32, 1) feat = fluid.layers.fc(conv, 10, act='softmax') cost = fluid.layers.cross_entropy(input=feat, label=label) avg_cost = fluid.layers.mean(x=cost) use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) eval_program = train_program.clone(for_test=True) #\u914d\u7f6e config = {'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'moving_average_abs_max'} build_strategy = fluid.BuildStrategy() exec_strategy = fluid.ExecutionStrategy() #\u8c03\u7528api quant_train_program = quant.quant_aware(train_program, place, config, for_test=False) quant_eval_program = quant.quant_aware(eval_program, place, config, for_test=True) #\u5173\u95ed\u7b56\u7565 build_strategy.fuse_all_reduce_ops = False build_strategy.sync_batch_norm = False quant_train_program = quant_train_program.with_data_parallel( loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy) inference_prog = quant.convert(quant_eval_program, place, config) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 \u91cf\u5316\u8bad\u7ec3demo \u3002 \u79bb\u7ebf\u91cf\u5316API paddleslim.quant.quant_post(executor, model_dir, quantize_model_path, sample_generator, model_filename=None, params_filename=None, batch_size=16, batch_nums=None, scope=None, algo='KL', quantizable_op_type=[\"conv2d\", \"depthwise_conv2d\", \"mul\"]) \u5bf9\u4fdd\u5b58\u5728 ${model_dir} \u4e0b\u7684\u6a21\u578b\u8fdb\u884c\u91cf\u5316\uff0c\u4f7f\u7528 sample_generator \u7684\u6570\u636e\u8fdb\u884c\u53c2\u6570\u6821\u6b63\u3002 \u53c2\u6570: - executor (fluid.Executor) - \u6267\u884c\u6a21\u578b\u7684executor\uff0c\u53ef\u4ee5\u5728cpu\u6216\u8005gpu\u4e0a\u6267\u884c\u3002 - model_dir\uff08str) - \u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u6240\u5728\u7684\u6587\u4ef6\u5939\u3002 - quantize_model_path(str) - \u4fdd\u5b58\u91cf\u5316\u540e\u7684\u6a21\u578b\u7684\u8def\u5f84 - sample_generator(python generator) - \u8bfb\u53d6\u6570\u636e\u6837\u672c\uff0c\u6bcf\u6b21\u8fd4\u56de\u4e00\u4e2a\u6837\u672c\u3002 - model_filename(str, optional) - \u6a21\u578b\u6587\u4ef6\u540d\uff0c\u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u9700\u8981\u8bbe\u7f6e model_filename \u4e3a\u6a21\u578b\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5426\u5219\u8bbe\u7f6e\u4e3a None \u5373\u53ef\u3002\u9ed8\u8ba4\u503c\u662f None \u3002 - params_filename(str) - \u53c2\u6570\u6587\u4ef6\u540d\uff0c\u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u9700\u8981\u8bbe\u7f6e params_filename \u4e3a\u53c2\u6570\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5426\u5219\u8bbe\u7f6e\u4e3a None \u5373\u53ef\u3002\u9ed8\u8ba4\u503c\u662f None \u3002 - batch_size(int) - \u6bcf\u4e2abatch\u7684\u56fe\u7247\u6570\u91cf\u3002\u9ed8\u8ba4\u503c\u4e3a16 \u3002 - batch_nums(int, optional) - \u8fed\u4ee3\u6b21\u6570\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a None \uff0c\u5219\u4f1a\u4e00\u76f4\u8fd0\u884c\u5230 sample_generator \u8fed\u4ee3\u7ed3\u675f\uff0c \u5426\u5219\uff0c\u8fed\u4ee3\u6b21\u6570\u4e3a batch_nums , \u4e5f\u5c31\u662f\u8bf4\u53c2\u4e0e\u5bf9 Scale \u8fdb\u884c\u6821\u6b63\u7684\u6837\u672c\u4e2a\u6570\u4e3a 'batch_nums' * 'batch_size' . - scope(fluid.Scope, optional) - \u7528\u6765\u83b7\u53d6\u548c\u5199\u5165 Variable , \u5982\u679c\u8bbe\u7f6e\u4e3a None ,\u5219\u4f7f\u7528 fluid.global_scope() . \u9ed8\u8ba4\u503c\u662f None . - algo(str) - \u91cf\u5316\u65f6\u4f7f\u7528\u7684\u7b97\u6cd5\u540d\u79f0\uff0c\u53ef\u4e3a 'KL' \u6216\u8005 'direct' \u3002\u8be5\u53c2\u6570\u4ec5\u9488\u5bf9\u6fc0\u6d3b\u503c\u7684\u91cf\u5316\uff0c\u56e0\u4e3a\u53c2\u6570\u503c\u7684\u91cf\u5316\u4f7f\u7528\u7684\u65b9\u5f0f\u4e3a 'channel_wise_abs_max' . \u5f53 algo \u8bbe\u7f6e\u4e3a 'direct' \u65f6\uff0c\u4f7f\u7528\u6821\u6b63\u6570\u636e\u7684\u6fc0\u6d3b\u503c\u7684\u7edd\u5bf9\u503c\u7684\u6700\u5927\u503c\u5f53\u4f5c Scale \u503c\uff0c\u5f53\u8bbe\u7f6e\u4e3a 'KL' \u65f6\uff0c\u5219\u4f7f\u7528 KL \u6563\u5ea6\u7684\u65b9\u6cd5\u6765\u8ba1\u7b97 Scale \u503c\u3002\u9ed8\u8ba4\u503c\u4e3a 'KL' \u3002 - quantizable_op_type(list[str]) - \u9700\u8981\u91cf\u5316\u7684 op \u7c7b\u578b\u5217\u8868\u3002\u9ed8\u8ba4\u503c\u4e3a [\"conv2d\", \"depthwise_conv2d\", \"mul\"] \u3002 \u8fd4\u56de \u65e0\u3002 \u6ce8\u610f\u4e8b\u9879 \u56e0\u4e3a\u8be5\u63a5\u53e3\u4f1a\u6536\u96c6\u6821\u6b63\u6570\u636e\u7684\u6240\u6709\u7684\u6fc0\u6d3b\u503c\uff0c\u6240\u4ee5\u4f7f\u7528\u7684\u6821\u6b63\u56fe\u7247\u4e0d\u80fd\u592a\u591a\u3002 'KL' \u6563\u5ea6\u7684\u8ba1\u7b97\u4e5f\u6bd4\u8f83\u8017\u65f6\u3002 \u4ee3\u7801\u793a\u4f8b \u6ce8\uff1a \u6b64\u793a\u4f8b\u4e0d\u80fd\u76f4\u63a5\u8fd0\u884c\uff0c\u56e0\u4e3a\u9700\u8981\u52a0\u8f7d ${model_dir} \u4e0b\u7684\u6a21\u578b\uff0c\u6240\u4ee5\u4e0d\u80fd\u76f4\u63a5\u8fd0\u884c\u3002 import paddle.fluid as fluid import paddle.dataset.mnist as reader from paddleslim.quant import quant_post val_reader = reader.train() use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) quant_post( executor=exe, model_dir='./model_path', quantize_model_path='./save_path', sample_generator=val_reader, model_filename='__model__', params_filename='__params__', batch_size=16, batch_nums=10) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 \u79bb\u7ebf\u91cf\u5316demo \u3002 Embedding\u91cf\u5316API paddleslim.quant.quant_embedding(program, place, config, scope=None) \u5bf9 Embedding \u53c2\u6570\u8fdb\u884c\u91cf\u5316\u3002 \u53c2\u6570: - program(fluid.Program) - \u9700\u8981\u91cf\u5316\u7684program - scope(fluid.Scope, optional) - \u7528\u6765\u83b7\u53d6\u548c\u5199\u5165 Variable , \u5982\u679c\u8bbe\u7f6e\u4e3a None ,\u5219\u4f7f\u7528 fluid.global_scope() . - place(fluid.CPUPlace or fluid.CUDAPlace) - \u8fd0\u884cprogram\u7684\u8bbe\u5907 - config(dict) - \u5b9a\u4e49\u91cf\u5316\u7684\u914d\u7f6e\u3002\u53ef\u4ee5\u914d\u7f6e\u7684\u53c2\u6570\u6709\uff1a - 'params_name' (str, required): \u9700\u8981\u8fdb\u884c\u91cf\u5316\u7684\u53c2\u6570\u540d\u79f0\uff0c\u6b64\u53c2\u6570\u5fc5\u987b\u8bbe\u7f6e\u3002 - 'quantize_type' (str, optional): \u91cf\u5316\u7684\u7c7b\u578b\uff0c\u76ee\u524d\u652f\u6301\u7684\u7c7b\u578b\u662f 'abs_max' , \u5f85\u652f\u6301\u7684\u7c7b\u578b\u6709 'log', 'product_quantization' \u3002 \u9ed8\u8ba4\u503c\u662f 'abs_max' . - 'quantize_bits' \uff08int, optional): \u91cf\u5316\u7684 bit \u6570\uff0c\u76ee\u524d\u652f\u6301\u7684 bit \u6570\u4e3a8\u3002\u9ed8\u8ba4\u503c\u662f8. - 'dtype' (str, optional): \u91cf\u5316\u4e4b\u540e\u7684\u6570\u636e\u7c7b\u578b\uff0c \u76ee\u524d\u652f\u6301\u7684\u662f 'int8' . \u9ed8\u8ba4\u503c\u662f int8 \u3002 - 'threshold' (float, optional): \u91cf\u5316\u4e4b\u524d\u5c06\u6839\u636e\u6b64\u9608\u503c\u5bf9\u9700\u8981\u91cf\u5316\u7684\u53c2\u6570\u503c\u8fdb\u884c clip . \u5982\u679c\u4e0d\u8bbe\u7f6e\uff0c\u5219\u8df3\u8fc7 clip \u8fc7\u7a0b\u76f4\u63a5\u91cf\u5316\u3002 \u8fd4\u56de \u91cf\u5316\u4e4b\u540e\u7684program \u8fd4\u56de\u7c7b\u578b fluid.Program \u4ee3\u7801\u793a\u4f8b import paddle.fluid as fluid import paddleslim.quant as quant train_program = fluid.Program() with fluid.program_guard(train_program): input_word = fluid.data(name=\"input_word\", shape=[None, 1], dtype='int64') input_emb = fluid.embedding( input=input_word, is_sparse=False, size=[100, 128], param_attr=fluid.ParamAttr(name='emb', initializer=fluid.initializer.Uniform(-0.005, 0.005))) infer_program = train_program.clone(for_test=True) use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) config = {'params_name': 'emb', 'quantize_type': 'abs_max'} quant_program = quant.quant_embedding(infer_program, place, config) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 Embedding\u91cf\u5316demo \u3002","title":"paddleslim.quant API\u6587\u6863"},{"location":"docs/api/quantization_api/#paddleslimquant-api","text":"","title":"paddleslim.quant API\u6587\u6863"},{"location":"docs/api/quantization_api/#api","text":"","title":"\u91cf\u5316\u8bad\u7ec3API"},{"location":"docs/api/quantization_api/#_1","text":"quant_config_default = { 'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'abs_max', 'weight_bits': 8, 'activation_bits': 8, # ops of name_scope in not_quant_pattern list, will not be quantized 'not_quant_pattern': ['skip_quant'], # ops of type in quantize_op_types, will be quantized 'quantize_op_types': ['conv2d', 'depthwise_conv2d', 'mul', 'elementwise_add', 'pool2d'], # data type after quantization, such as 'uint8', 'int8', etc. default is 'int8' 'dtype': 'int8', # window size for 'range_abs_max' quantization. defaulf is 10000 'window_size': 10000, # The decay coefficient of moving average, default is 0.9 'moving_rate': 0.9, # if set quant_weight_only True, then only quantize parameters of layers which need to be quantized, # and activations will not be quantized. 'quant_weight_only': False } \u8bbe\u7f6e\u91cf\u5316\u8bad\u7ec3\u9700\u8981\u7684\u914d\u7f6e\u3002 \u53c2\u6570\uff1a weight_quantize_type(str) - \u53c2\u6570\u91cf\u5316\u65b9\u5f0f\u3002\u53ef\u9009 'abs_max' , 'channel_wise_abs_max' , 'range_abs_max' , 'moving_average_abs_max' \u3002 \u9ed8\u8ba4 'abs_max' \u3002 activation_quantize_type(str) - \u6fc0\u6d3b\u91cf\u5316\u65b9\u5f0f\uff0c\u53ef\u9009 'abs_max' , 'range_abs_max' , 'moving_average_abs_max' \uff0c\u9ed8\u8ba4 'abs_max' \u3002 weight_bits(int) - \u53c2\u6570\u91cf\u5316bit\u6570\uff0c\u9ed8\u8ba48, \u63a8\u8350\u8bbe\u4e3a8\u3002 activation_bits(int) - \u6fc0\u6d3b\u91cf\u5316bit\u6570\uff0c\u9ed8\u8ba48\uff0c \u63a8\u8350\u8bbe\u4e3a8\u3002 not_quant_pattern(str or list[str]) - \u6240\u6709 name_scope \u5305\u542b 'not_quant_pattern' \u5b57\u7b26\u4e32\u7684 op \uff0c\u90fd\u4e0d\u91cf\u5316, \u8bbe\u7f6e\u65b9\u5f0f\u8bf7\u53c2\u8003 fluid.name_scope() \u3002 quantize_op_types(list[str]) - \u9700\u8981\u8fdb\u884c\u91cf\u5316\u7684 op \u7c7b\u578b\uff0c\u76ee\u524d\u652f\u6301 'conv2d', 'depthwise_conv2d', 'mul' \u3002 dtype(int8) - \u91cf\u5316\u540e\u7684\u53c2\u6570\u7c7b\u578b\uff0c\u9ed8\u8ba4 int8 , \u76ee\u524d\u4ec5\u652f\u6301 int8 \u3002 window_size(int) - 'range_abs_max' \u91cf\u5316\u65b9\u5f0f\u7684 window size \uff0c\u9ed8\u8ba410000\u3002 moving_rate(int) - 'moving_average_abs_max' \u91cf\u5316\u65b9\u5f0f\u7684\u8870\u51cf\u7cfb\u6570\uff0c\u9ed8\u8ba4 0.9\u3002 quant_weight_only(bool) - \u662f\u5426\u53ea\u91cf\u5316\u53c2\u6570\uff0c\u5982\u679c\u8bbe\u4e3a True \uff0c\u5219\u6fc0\u6d3b\u4e0d\u8fdb\u884c\u91cf\u5316\uff0c\u9ed8\u8ba4 False \u3002\u76ee\u524d\u6682\u4e0d\u652f\u6301\u8bbe\u7f6e\u4e3a True \u3002 \u8bbe\u7f6e\u4e3a True \u65f6\uff0c\u53ea\u91cf\u5316\u53c2\u6570\uff0c\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u80fd\u51cf\u5c11\u663e\u5b58\u5360\u7528\u548c\u52a0\u901f\uff0c\u53ea\u80fd\u7528\u6765\u51cf\u5c11\u5e26\u5bbd\u3002","title":"\u91cf\u5316\u914d\u7f6e"},{"location":"docs/api/quantization_api/#paddleslimquantquant_awareprogram-place-config-scopenone-for_testfalse","text":"\u5728 program \u4e2d\u52a0\u5165\u91cf\u5316\u548c\u53cd\u91cf\u5316 op , \u7528\u4e8e\u91cf\u5316\u8bad\u7ec3\u3002 \u53c2\u6570\uff1a program (fluid.Program) - \u4f20\u5165\u8bad\u7ec3\u6216\u6d4b\u8bd5 program \u3002 place(fluid.CPUPlace or fluid.CUDAPlace) - \u8be5\u53c2\u6570\u8868\u793a Executor \u6267\u884c\u6240\u5728\u7684\u8bbe\u5907\u3002 config(dict) - \u91cf\u5316\u914d\u7f6e\u8868\u3002 scope(fluid.Scope, optional) - \u4f20\u5165\u7528\u4e8e\u5b58\u50a8 Variable \u7684 scope \uff0c\u9700\u8981\u4f20\u5165 program \u6240\u4f7f\u7528\u7684 scope \uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u662f fluid.global_scope() \u3002\u8bbe\u7f6e\u4e3a None \u65f6\u5c06\u4f7f\u7528 fluid.global_scope() \uff0c\u9ed8\u8ba4\u503c\u4e3a None \u3002 for_test(bool) - \u5982\u679c program \u53c2\u6570\u662f\u4e00\u4e2a\u6d4b\u8bd5 program \uff0c for_test \u5e94\u8bbe\u4e3a True \uff0c\u5426\u5219\u8bbe\u4e3a False \u3002 \u8fd4\u56de \u542b\u6709\u91cf\u5316\u548c\u53cd\u91cf\u5316 operator \u7684 program \u8fd4\u56de\u7c7b\u578b \u5f53 for_test=False \uff0c\u8fd4\u56de\u7c7b\u578b\u4e3a fluid.CompiledProgram \uff0c \u6ce8\u610f\uff0c\u6b64\u8fd4\u56de\u503c\u4e0d\u80fd\u7528\u4e8e\u4fdd\u5b58\u53c2\u6570 \u3002 \u5f53 for_test=True \uff0c\u8fd4\u56de\u7c7b\u578b\u4e3a fluid.Program \u3002 \u6ce8\u610f\u4e8b\u9879 \u6b64\u63a5\u53e3\u4f1a\u6539\u53d8 program \u7ed3\u6784\uff0c\u5e76\u4e14\u53ef\u80fd\u589e\u52a0\u4e00\u4e9b persistable \u7684\u53d8\u91cf\uff0c\u6240\u4ee5\u52a0\u8f7d\u6a21\u578b\u53c2\u6570\u65f6\u8bf7\u6ce8\u610f\u548c\u76f8\u5e94\u7684 program \u5bf9\u5e94\u3002 \u6b64\u63a5\u53e3\u5e95\u5c42\u7ecf\u5386\u4e86 fluid.Program -> fluid.framework.IrGraph -> fluid.Program \u7684\u8f6c\u53d8\uff0c\u5728 fluid.framework.IrGraph \u4e2d\u6ca1\u6709 Parameter \u7684\u6982\u5ff5\uff0c Variable \u53ea\u6709 persistable \u548c not persistable \u7684\u533a\u522b\uff0c\u6240\u4ee5\u5728\u4fdd\u5b58\u548c\u52a0\u8f7d\u53c2\u6570\u65f6\uff0c\u8bf7\u4f7f\u7528 fluid.io.save_persistables \u548c fluid.io.load_persistables \u63a5\u53e3\u3002 \u7531\u4e8e\u6b64\u63a5\u53e3\u4f1a\u6839\u636e program \u7684\u7ed3\u6784\u548c\u91cf\u5316\u914d\u7f6e\u6765\u5bf9 program \u6dfb\u52a0op\uff0c\u6240\u4ee5 Paddle \u4e2d\u4e00\u4e9b\u901a\u8fc7 fuse op \u6765\u52a0\u901f\u8bad\u7ec3\u7684\u7b56\u7565\u4e0d\u80fd\u4f7f\u7528\u3002\u5df2\u77e5\u4ee5\u4e0b\u7b56\u7565\u5728\u4f7f\u7528\u91cf\u5316\u65f6\u5fc5\u987b\u8bbe\u4e3a False \uff1a fuse_all_reduce_ops, sync_batch_norm \u3002 \u5982\u679c\u4f20\u5165\u7684 program \u4e2d\u5b58\u5728\u548c\u4efb\u4f55op\u90fd\u6ca1\u6709\u8fde\u63a5\u7684 Variable \uff0c\u5219\u4f1a\u5728\u91cf\u5316\u7684\u8fc7\u7a0b\u4e2d\u88ab\u4f18\u5316\u6389\u3002","title":"paddleslim.quant.quant_aware(program, place, config, scope=None, for_test=False)"},{"location":"docs/api/quantization_api/#paddleslimquantconvertprogram-place-config-scopenone-save_int8false","text":"\u628a\u8bad\u7ec3\u597d\u7684\u91cf\u5316 program \uff0c\u8f6c\u6362\u4e3a\u53ef\u7528\u4e8e\u4fdd\u5b58 inference model \u7684 program \u3002 \u53c2\u6570\uff1a - program (fluid.Program) - \u4f20\u5165\u6d4b\u8bd5 program \u3002 - place(fluid.CPUPlace or fluid.CUDAPlace) - \u8be5\u53c2\u6570\u8868\u793a Executor \u6267\u884c\u6240\u5728\u7684\u8bbe\u5907\u3002 - config(dict) - \u91cf\u5316\u914d\u7f6e\u8868\u3002 - scope(fluid.Scope) - \u4f20\u5165\u7528\u4e8e\u5b58\u50a8 Variable \u7684 scope \uff0c\u9700\u8981\u4f20\u5165 program \u6240\u4f7f\u7528\u7684 scope \uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u662f fluid.global_scope() \u3002\u8bbe\u7f6e\u4e3a None \u65f6\u5c06\u4f7f\u7528 fluid.global_scope() \uff0c\u9ed8\u8ba4\u503c\u4e3a None \u3002 - save_int8\uff08bool) - \u662f\u5426\u9700\u8981\u8fd4\u56de\u53c2\u6570\u4e3a int8 \u7684 program \u3002\u8be5\u529f\u80fd\u76ee\u524d\u53ea\u80fd\u7528\u4e8e\u786e\u8ba4\u6a21\u578b\u5927\u5c0f\u3002\u9ed8\u8ba4\u503c\u4e3a False \u3002 \u8fd4\u56de program (fluid.Program) - freezed program\uff0c\u53ef\u7528\u4e8e\u4fdd\u5b58inference model\uff0c\u53c2\u6570\u4e3a float32 \u7c7b\u578b\uff0c\u4f46\u5176\u6570\u503c\u8303\u56f4\u53ef\u7528int8\u8868\u793a\u3002 int8_program (fluid.Program) - freezed program\uff0c\u53ef\u7528\u4e8e\u4fdd\u5b58inference model\uff0c\u53c2\u6570\u4e3a int8 \u7c7b\u578b\u3002\u5f53 save_int8 \u4e3a False \u65f6\uff0c\u4e0d\u8fd4\u56de\u8be5\u503c\u3002 \u6ce8\u610f\u4e8b\u9879 \u56e0\u4e3a\u8be5\u63a5\u53e3\u4f1a\u5bf9 op \u548c Variable \u505a\u76f8\u5e94\u7684\u5220\u9664\u548c\u4fee\u6539\uff0c\u6240\u4ee5\u6b64\u63a5\u53e3\u53ea\u80fd\u5728\u8bad\u7ec3\u5b8c\u6210\u4e4b\u540e\u8c03\u7528\u3002\u5982\u679c\u60f3\u8f6c\u5316\u8bad\u7ec3\u7684\u4e2d\u95f4\u6a21\u578b\uff0c\u53ef\u52a0\u8f7d\u76f8\u5e94\u7684\u53c2\u6570\u4e4b\u540e\u518d\u4f7f\u7528\u6b64\u63a5\u53e3\u3002 \u4ee3\u7801\u793a\u4f8b #encoding=utf8 import paddle.fluid as fluid import paddleslim.quant as quant train_program = fluid.Program() with fluid.program_guard(train_program): image = fluid.data(name='x', shape=[None, 1, 28, 28]) label = fluid.data(name='label', shape=[None, 1], dtype='int64') conv = fluid.layers.conv2d(image, 32, 1) feat = fluid.layers.fc(conv, 10, act='softmax') cost = fluid.layers.cross_entropy(input=feat, label=label) avg_cost = fluid.layers.mean(x=cost) use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) eval_program = train_program.clone(for_test=True) #\u914d\u7f6e config = {'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'moving_average_abs_max'} build_strategy = fluid.BuildStrategy() exec_strategy = fluid.ExecutionStrategy() #\u8c03\u7528api quant_train_program = quant.quant_aware(train_program, place, config, for_test=False) quant_eval_program = quant.quant_aware(eval_program, place, config, for_test=True) #\u5173\u95ed\u7b56\u7565 build_strategy.fuse_all_reduce_ops = False build_strategy.sync_batch_norm = False quant_train_program = quant_train_program.with_data_parallel( loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy) inference_prog = quant.convert(quant_eval_program, place, config) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 \u91cf\u5316\u8bad\u7ec3demo \u3002","title":"paddleslim.quant.convert(program, place, config, scope=None, save_int8=False)"},{"location":"docs/api/quantization_api/#api_1","text":"paddleslim.quant.quant_post(executor, model_dir, quantize_model_path, sample_generator, model_filename=None, params_filename=None, batch_size=16, batch_nums=None, scope=None, algo='KL', quantizable_op_type=[\"conv2d\", \"depthwise_conv2d\", \"mul\"]) \u5bf9\u4fdd\u5b58\u5728 ${model_dir} \u4e0b\u7684\u6a21\u578b\u8fdb\u884c\u91cf\u5316\uff0c\u4f7f\u7528 sample_generator \u7684\u6570\u636e\u8fdb\u884c\u53c2\u6570\u6821\u6b63\u3002 \u53c2\u6570: - executor (fluid.Executor) - \u6267\u884c\u6a21\u578b\u7684executor\uff0c\u53ef\u4ee5\u5728cpu\u6216\u8005gpu\u4e0a\u6267\u884c\u3002 - model_dir\uff08str) - \u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u6240\u5728\u7684\u6587\u4ef6\u5939\u3002 - quantize_model_path(str) - \u4fdd\u5b58\u91cf\u5316\u540e\u7684\u6a21\u578b\u7684\u8def\u5f84 - sample_generator(python generator) - \u8bfb\u53d6\u6570\u636e\u6837\u672c\uff0c\u6bcf\u6b21\u8fd4\u56de\u4e00\u4e2a\u6837\u672c\u3002 - model_filename(str, optional) - \u6a21\u578b\u6587\u4ef6\u540d\uff0c\u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u9700\u8981\u8bbe\u7f6e model_filename \u4e3a\u6a21\u578b\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5426\u5219\u8bbe\u7f6e\u4e3a None \u5373\u53ef\u3002\u9ed8\u8ba4\u503c\u662f None \u3002 - params_filename(str) - \u53c2\u6570\u6587\u4ef6\u540d\uff0c\u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u9700\u8981\u8bbe\u7f6e params_filename \u4e3a\u53c2\u6570\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5426\u5219\u8bbe\u7f6e\u4e3a None \u5373\u53ef\u3002\u9ed8\u8ba4\u503c\u662f None \u3002 - batch_size(int) - \u6bcf\u4e2abatch\u7684\u56fe\u7247\u6570\u91cf\u3002\u9ed8\u8ba4\u503c\u4e3a16 \u3002 - batch_nums(int, optional) - \u8fed\u4ee3\u6b21\u6570\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a None \uff0c\u5219\u4f1a\u4e00\u76f4\u8fd0\u884c\u5230 sample_generator \u8fed\u4ee3\u7ed3\u675f\uff0c \u5426\u5219\uff0c\u8fed\u4ee3\u6b21\u6570\u4e3a batch_nums , \u4e5f\u5c31\u662f\u8bf4\u53c2\u4e0e\u5bf9 Scale \u8fdb\u884c\u6821\u6b63\u7684\u6837\u672c\u4e2a\u6570\u4e3a 'batch_nums' * 'batch_size' . - scope(fluid.Scope, optional) - \u7528\u6765\u83b7\u53d6\u548c\u5199\u5165 Variable , \u5982\u679c\u8bbe\u7f6e\u4e3a None ,\u5219\u4f7f\u7528 fluid.global_scope() . \u9ed8\u8ba4\u503c\u662f None . - algo(str) - \u91cf\u5316\u65f6\u4f7f\u7528\u7684\u7b97\u6cd5\u540d\u79f0\uff0c\u53ef\u4e3a 'KL' \u6216\u8005 'direct' \u3002\u8be5\u53c2\u6570\u4ec5\u9488\u5bf9\u6fc0\u6d3b\u503c\u7684\u91cf\u5316\uff0c\u56e0\u4e3a\u53c2\u6570\u503c\u7684\u91cf\u5316\u4f7f\u7528\u7684\u65b9\u5f0f\u4e3a 'channel_wise_abs_max' . \u5f53 algo \u8bbe\u7f6e\u4e3a 'direct' \u65f6\uff0c\u4f7f\u7528\u6821\u6b63\u6570\u636e\u7684\u6fc0\u6d3b\u503c\u7684\u7edd\u5bf9\u503c\u7684\u6700\u5927\u503c\u5f53\u4f5c Scale \u503c\uff0c\u5f53\u8bbe\u7f6e\u4e3a 'KL' \u65f6\uff0c\u5219\u4f7f\u7528 KL \u6563\u5ea6\u7684\u65b9\u6cd5\u6765\u8ba1\u7b97 Scale \u503c\u3002\u9ed8\u8ba4\u503c\u4e3a 'KL' \u3002 - quantizable_op_type(list[str]) - \u9700\u8981\u91cf\u5316\u7684 op \u7c7b\u578b\u5217\u8868\u3002\u9ed8\u8ba4\u503c\u4e3a [\"conv2d\", \"depthwise_conv2d\", \"mul\"] \u3002 \u8fd4\u56de \u65e0\u3002 \u6ce8\u610f\u4e8b\u9879 \u56e0\u4e3a\u8be5\u63a5\u53e3\u4f1a\u6536\u96c6\u6821\u6b63\u6570\u636e\u7684\u6240\u6709\u7684\u6fc0\u6d3b\u503c\uff0c\u6240\u4ee5\u4f7f\u7528\u7684\u6821\u6b63\u56fe\u7247\u4e0d\u80fd\u592a\u591a\u3002 'KL' \u6563\u5ea6\u7684\u8ba1\u7b97\u4e5f\u6bd4\u8f83\u8017\u65f6\u3002 \u4ee3\u7801\u793a\u4f8b \u6ce8\uff1a \u6b64\u793a\u4f8b\u4e0d\u80fd\u76f4\u63a5\u8fd0\u884c\uff0c\u56e0\u4e3a\u9700\u8981\u52a0\u8f7d ${model_dir} \u4e0b\u7684\u6a21\u578b\uff0c\u6240\u4ee5\u4e0d\u80fd\u76f4\u63a5\u8fd0\u884c\u3002 import paddle.fluid as fluid import paddle.dataset.mnist as reader from paddleslim.quant import quant_post val_reader = reader.train() use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) quant_post( executor=exe, model_dir='./model_path', quantize_model_path='./save_path', sample_generator=val_reader, model_filename='__model__', params_filename='__params__', batch_size=16, batch_nums=10) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 \u79bb\u7ebf\u91cf\u5316demo \u3002","title":"\u79bb\u7ebf\u91cf\u5316API"},{"location":"docs/api/quantization_api/#embeddingapi","text":"paddleslim.quant.quant_embedding(program, place, config, scope=None) \u5bf9 Embedding \u53c2\u6570\u8fdb\u884c\u91cf\u5316\u3002 \u53c2\u6570: - program(fluid.Program) - \u9700\u8981\u91cf\u5316\u7684program - scope(fluid.Scope, optional) - \u7528\u6765\u83b7\u53d6\u548c\u5199\u5165 Variable , \u5982\u679c\u8bbe\u7f6e\u4e3a None ,\u5219\u4f7f\u7528 fluid.global_scope() . - place(fluid.CPUPlace or fluid.CUDAPlace) - \u8fd0\u884cprogram\u7684\u8bbe\u5907 - config(dict) - \u5b9a\u4e49\u91cf\u5316\u7684\u914d\u7f6e\u3002\u53ef\u4ee5\u914d\u7f6e\u7684\u53c2\u6570\u6709\uff1a - 'params_name' (str, required): \u9700\u8981\u8fdb\u884c\u91cf\u5316\u7684\u53c2\u6570\u540d\u79f0\uff0c\u6b64\u53c2\u6570\u5fc5\u987b\u8bbe\u7f6e\u3002 - 'quantize_type' (str, optional): \u91cf\u5316\u7684\u7c7b\u578b\uff0c\u76ee\u524d\u652f\u6301\u7684\u7c7b\u578b\u662f 'abs_max' , \u5f85\u652f\u6301\u7684\u7c7b\u578b\u6709 'log', 'product_quantization' \u3002 \u9ed8\u8ba4\u503c\u662f 'abs_max' . - 'quantize_bits' \uff08int, optional): \u91cf\u5316\u7684 bit \u6570\uff0c\u76ee\u524d\u652f\u6301\u7684 bit \u6570\u4e3a8\u3002\u9ed8\u8ba4\u503c\u662f8. - 'dtype' (str, optional): \u91cf\u5316\u4e4b\u540e\u7684\u6570\u636e\u7c7b\u578b\uff0c \u76ee\u524d\u652f\u6301\u7684\u662f 'int8' . \u9ed8\u8ba4\u503c\u662f int8 \u3002 - 'threshold' (float, optional): \u91cf\u5316\u4e4b\u524d\u5c06\u6839\u636e\u6b64\u9608\u503c\u5bf9\u9700\u8981\u91cf\u5316\u7684\u53c2\u6570\u503c\u8fdb\u884c clip . \u5982\u679c\u4e0d\u8bbe\u7f6e\uff0c\u5219\u8df3\u8fc7 clip \u8fc7\u7a0b\u76f4\u63a5\u91cf\u5316\u3002 \u8fd4\u56de \u91cf\u5316\u4e4b\u540e\u7684program \u8fd4\u56de\u7c7b\u578b fluid.Program \u4ee3\u7801\u793a\u4f8b import paddle.fluid as fluid import paddleslim.quant as quant train_program = fluid.Program() with fluid.program_guard(train_program): input_word = fluid.data(name=\"input_word\", shape=[None, 1], dtype='int64') input_emb = fluid.embedding( input=input_word, is_sparse=False, size=[100, 128], param_attr=fluid.ParamAttr(name='emb', initializer=fluid.initializer.Uniform(-0.005, 0.005))) infer_program = train_program.clone(for_test=True) use_gpu = True place = fluid.CUDAPlace(0) if use_gpu else fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) config = {'params_name': 'emb', 'quantize_type': 'abs_max'} quant_program = quant.quant_embedding(infer_program, place, config) \u66f4\u8be6\u7ec6\u7684\u7528\u6cd5\u8bf7\u53c2\u8003 Embedding\u91cf\u5316demo \u3002","title":"Embedding\u91cf\u5316API"},{"location":"docs/api/search_space/","text":"paddleslim.nas \u63d0\u4f9b\u7684\u641c\u7d22\u7a7a\u95f4\uff1a \u6839\u636e\u539f\u672c\u6a21\u578b\u7ed3\u6784\u6784\u9020\u641c\u7d22\u7a7a\u95f4\uff1a 1.1 MobileNetV2Space 1.2 MobileNetV1Space 1.3 ResNetSpace \u6839\u636e\u76f8\u5e94\u6a21\u578b\u7684block\u6784\u9020\u641c\u7d22\u7a7a\u95f4 2.1 MobileNetV1BlockSpace 2.2 MobileNetV2BlockSpace 2.3 ResNetBlockSpace 2.4 InceptionABlockSpace 2.5 InceptionCBlockSpace \u641c\u7d22\u7a7a\u95f4\u7684\u914d\u7f6e\u4ecb\u7ecd\uff1a input_size(int|None) \uff1a input_size \u8868\u793a\u8f93\u5165feature map\u7684\u5927\u5c0f\u3002 output_size(int|None) \uff1a output_size \u8868\u793a\u8f93\u51fafeature map\u7684\u5927\u5c0f\u3002 block_num(int|None) \uff1a block_num \u8868\u793a\u641c\u7d22\u7a7a\u95f4\u4e2dblock\u7684\u6570\u91cf\u3002 block_mask(list|None) \uff1a block_mask \u8868\u793a\u5f53\u524d\u7684block\u662f\u4e00\u4e2areduction block\u8fd8\u662f\u4e00\u4e2anormal block\uff0c\u662f\u4e00\u7ec4\u75310\u30011\u7ec4\u6210\u7684\u5217\u8868\uff0c0\u8868\u793a\u5f53\u524dblock\u662fnormal block\uff0c1\u8868\u793a\u5f53\u524dblock\u662freduction block\u3002\u5982\u679c\u8bbe\u7f6e\u4e86 block_mask \uff0c\u5219\u4e3b\u8981\u4ee5 block_mask \u4e3a\u4e3b\u8981\u914d\u7f6e\uff0c input_size \uff0c output_size \u548c block_num \u4e09\u79cd\u914d\u7f6e\u662f\u65e0\u6548\u7684\u3002 Note: 1. reduction block\u8868\u793a\u7ecf\u8fc7\u8fd9\u4e2ablock\u4e4b\u540e\u7684feature map\u5927\u5c0f\u4e0b\u964d\u4e3a\u4e4b\u524d\u7684\u4e00\u534a\uff0cnormal block\u8868\u793a\u7ecf\u8fc7\u8fd9\u4e2ablock\u4e4b\u540efeature map\u5927\u5c0f\u4e0d\u53d8\u3002 2. input_size \u548c output_size \u7528\u6765\u8ba1\u7b97\u6574\u4e2a\u6a21\u578b\u7ed3\u6784\u4e2dreduction block\u6570\u91cf\u3002 \u641c\u7d22\u7a7a\u95f4\u793a\u4f8b\uff1a \u4f7f\u7528paddleslim\u4e2d\u63d0\u4f9b\u7528\u539f\u672c\u7684\u6a21\u578b\u7ed3\u6784\u6765\u6784\u9020\u641c\u7d22\u7a7a\u95f4\u7684\u8bdd\uff0c\u4ec5\u9700\u8981\u6307\u5b9a\u641c\u7d22\u7a7a\u95f4\u540d\u5b57\u5373\u53ef\u3002\u4f8b\u5982\uff1a\u5982\u679c\u4f7f\u7528\u539f\u672c\u7684MobileNetV2\u7684\u641c\u7d22\u7a7a\u95f4\u8fdb\u884c\u641c\u7d22\u7684\u8bdd\uff0c\u4f20\u5165SANAS\u4e2d\u7684config\u76f4\u63a5\u6307\u5b9a\u4e3a[('MobileNetV2Space')]\u3002 \u4f7f\u7528paddleslim\u4e2d\u63d0\u4f9b\u7684block\u641c\u7d22\u7a7a\u95f4\u6784\u9020\u641c\u7d22\u7a7a\u95f4\uff1a 2.1 \u4f7f\u7528 input_size , output_size \u548c block_num \u6765\u6784\u9020\u641c\u7d22\u7a7a\u95f4\u3002\u4f8b\u5982\uff1a\u4f20\u5165SANAS\u7684config\u53ef\u4ee5\u6307\u5b9a\u4e3a[('MobileNetV2BlockSpace', {'input_size': 224, 'output_size': 32, 'block_num': 10})]\u3002 2.2 \u4f7f\u7528 block_mask \u6784\u9020\u641c\u7d22\u7a7a\u95f4\u3002\u4f8b\u5982\uff1a\u4f20\u5165SANAS\u7684config\u53ef\u4ee5\u6307\u5b9a\u4e3a[('MobileNetV2BlockSpace', {'block_mask': [0, 1, 1, 1, 1, 0, 1, 0]})]\u3002 \u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4(search space) \u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4\u7c7b\u9700\u8981\u7ee7\u627f\u641c\u7d22\u7a7a\u95f4\u57fa\u7c7b\u5e76\u91cd\u5199\u4ee5\u4e0b\u51e0\u90e8\u5206\uff1a 1. \u521d\u59cb\u5316\u7684tokens( init_tokens \u51fd\u6570)\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a\u81ea\u5df1\u60f3\u8981\u7684tokens\u5217\u8868, tokens\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u6570\u5b57\u6307\u7684\u662f\u5f53\u524d\u6570\u5b57\u5728\u76f8\u5e94\u7684\u641c\u7d22\u5217\u8868\u4e2d\u7684\u7d22\u5f15\u3002\u4f8b\u5982\u672c\u793a\u4f8b\u4e2d\u82e5tokens=[0, 3, 5]\uff0c\u5219\u4ee3\u8868\u5f53\u524d\u6a21\u578b\u7ed3\u6784\u641c\u7d22\u5230\u7684\u901a\u9053\u6570\u4e3a[8, 40, 128]\u3002 2. token\u4e2d\u6bcf\u4e2a\u6570\u5b57\u7684\u641c\u7d22\u5217\u8868\u957f\u5ea6( range_table \u51fd\u6570)\uff0ctokens\u4e2d\u6bcf\u4e2atoken\u7684\u7d22\u5f15\u8303\u56f4\u3002 3. \u6839\u636etoken\u4ea7\u751f\u6a21\u578b\u7ed3\u6784( token2arch \u51fd\u6570)\uff0c\u6839\u636e\u641c\u7d22\u5230\u7684tokens\u5217\u8868\u4ea7\u751f\u6a21\u578b\u7ed3\u6784\u3002 \u4ee5\u65b0\u589ereset block\u4e3a\u4f8b\u8bf4\u660e\u5982\u4f55\u6784\u9020\u81ea\u5df1\u7684search space\u3002\u81ea\u5b9a\u4e49\u7684search space\u4e0d\u80fd\u548c\u5df2\u6709\u7684search space\u540c\u540d\u3002 ### \u5f15\u5165\u641c\u7d22\u7a7a\u95f4\u57fa\u7c7b\u51fd\u6570\u548csearch space\u7684\u6ce8\u518c\u7c7b\u51fd\u6570 from .search_space_base import SearchSpaceBase from .search_space_registry import SEARCHSPACE import numpy as np ### \u9700\u8981\u8c03\u7528\u6ce8\u518c\u51fd\u6570\u628a\u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4\u6ce8\u518c\u5230space space\u4e2d @SEARCHSPACE.register ### \u5b9a\u4e49\u4e00\u4e2a\u7ee7\u627fSearchSpaceBase\u57fa\u7c7b\u7684\u641c\u7d22\u7a7a\u95f4\u7684\u7c7b\u51fd\u6570 class ResNetBlockSpace2(SearchSpaceBase): def __init__(self, input_size, output_size, block_num, block_mask): ### \u5b9a\u4e49\u4e00\u4e9b\u5b9e\u9645\u60f3\u8981\u641c\u7d22\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a\u901a\u9053\u6570\u3001\u6bcf\u4e2a\u5377\u79ef\u7684\u91cd\u590d\u6b21\u6570\u3001\u5377\u79ef\u6838\u5927\u5c0f\u7b49\u7b49 ### self.filter_num \u4ee3\u8868\u901a\u9053\u6570\u7684\u641c\u7d22\u5217\u8868 self.filter_num = np.array([8, 16, 32, 40, 64, 128, 256, 512]) ### \u5b9a\u4e49\u521d\u59cb\u5316token\uff0c\u521d\u59cb\u5316token\u7684\u957f\u5ea6\u6839\u636e\u4f20\u5165\u7684block_num\u6216\u8005block_mask\u7684\u957f\u5ea6\u6765\u5f97\u5230\u7684 def init_tokens(self): return [0] * 3 * len(self.block_mask) ### \u5b9a\u4e49 def range_table(self): return [len(self.filter_num)] * 3 * len(self.block_mask) def token2arch(self, tokens=None): if tokens == None: tokens = self.init_tokens() self.bottleneck_params_list = [] for i in range(len(self.block_mask)): self.bottleneck_params_list.append(self.filter_num[tokens[i * 3 + 0]], self.filter_num[tokens[i * 3 + 1]], self.filter_num[tokens[i * 3 + 2]], 2 if self.block_mask[i] == 1 else 1) def net_arch(input): for i, layer_setting in enumerate(self.bottleneck_params_list): channel_num, stride = layer_setting[:-1], layer_setting[-1] input = self._resnet_block(input, channel_num, stride, name='resnet_layer{}'.format(i+1)) return input return net_arch ### \u6784\u9020\u5177\u4f53block\u7684\u64cd\u4f5c def _resnet_block(self, input, channel_num, stride, name=None): shortcut_conv = self._shortcut(input, channel_num[2], stride, name=name) input = self._conv_bn_layer(input=input, num_filters=channel_num[0], filter_size=1, act='relu', name=name + '_conv0') input = self._conv_bn_layer(input=input, num_filters=channel_num[1], filter_size=3, stride=stride, act='relu', name=name + '_conv1') input = self._conv_bn_layer(input=input, num_filters=channel_num[2], filter_size=1, name=name + '_conv2') return fluid.layers.elementwise_add(x=shortcut_conv, y=input, axis=0, name=name+'_elementwise_add') def _shortcut(self, input, channel_num, stride, name=None): channel_in = input.shape[1] if channel_in != channel_num or stride != 1: return self.conv_bn_layer(input, num_filters=channel_num, filter_size=1, stride=stride, name=name+'_shortcut') else: return input def _conv_bn_layer(self, input, num_filters, filter_size, stride=1, padding='SAME', act=None, name=None): conv = fluid.layers.conv2d(input, num_filters, filter_size, stride, name=name+'_conv') bn = fluid.layers.batch_norm(conv, act=act, name=name+'_bn') return bn","title":"paddleslim.nas \u63d0\u4f9b\u7684\u641c\u7d22\u7a7a\u95f4\uff1a"},{"location":"docs/api/search_space/#paddleslimnas","text":"\u6839\u636e\u539f\u672c\u6a21\u578b\u7ed3\u6784\u6784\u9020\u641c\u7d22\u7a7a\u95f4\uff1a 1.1 MobileNetV2Space 1.2 MobileNetV1Space 1.3 ResNetSpace \u6839\u636e\u76f8\u5e94\u6a21\u578b\u7684block\u6784\u9020\u641c\u7d22\u7a7a\u95f4 2.1 MobileNetV1BlockSpace 2.2 MobileNetV2BlockSpace 2.3 ResNetBlockSpace 2.4 InceptionABlockSpace 2.5 InceptionCBlockSpace","title":"paddleslim.nas \u63d0\u4f9b\u7684\u641c\u7d22\u7a7a\u95f4\uff1a"},{"location":"docs/api/search_space/#_1","text":"input_size(int|None) \uff1a input_size \u8868\u793a\u8f93\u5165feature map\u7684\u5927\u5c0f\u3002 output_size(int|None) \uff1a output_size \u8868\u793a\u8f93\u51fafeature map\u7684\u5927\u5c0f\u3002 block_num(int|None) \uff1a block_num \u8868\u793a\u641c\u7d22\u7a7a\u95f4\u4e2dblock\u7684\u6570\u91cf\u3002 block_mask(list|None) \uff1a block_mask \u8868\u793a\u5f53\u524d\u7684block\u662f\u4e00\u4e2areduction block\u8fd8\u662f\u4e00\u4e2anormal block\uff0c\u662f\u4e00\u7ec4\u75310\u30011\u7ec4\u6210\u7684\u5217\u8868\uff0c0\u8868\u793a\u5f53\u524dblock\u662fnormal block\uff0c1\u8868\u793a\u5f53\u524dblock\u662freduction block\u3002\u5982\u679c\u8bbe\u7f6e\u4e86 block_mask \uff0c\u5219\u4e3b\u8981\u4ee5 block_mask \u4e3a\u4e3b\u8981\u914d\u7f6e\uff0c input_size \uff0c output_size \u548c block_num \u4e09\u79cd\u914d\u7f6e\u662f\u65e0\u6548\u7684\u3002 Note: 1. reduction block\u8868\u793a\u7ecf\u8fc7\u8fd9\u4e2ablock\u4e4b\u540e\u7684feature map\u5927\u5c0f\u4e0b\u964d\u4e3a\u4e4b\u524d\u7684\u4e00\u534a\uff0cnormal block\u8868\u793a\u7ecf\u8fc7\u8fd9\u4e2ablock\u4e4b\u540efeature map\u5927\u5c0f\u4e0d\u53d8\u3002 2. input_size \u548c output_size \u7528\u6765\u8ba1\u7b97\u6574\u4e2a\u6a21\u578b\u7ed3\u6784\u4e2dreduction block\u6570\u91cf\u3002","title":"\u641c\u7d22\u7a7a\u95f4\u7684\u914d\u7f6e\u4ecb\u7ecd\uff1a"},{"location":"docs/api/search_space/#_2","text":"\u4f7f\u7528paddleslim\u4e2d\u63d0\u4f9b\u7528\u539f\u672c\u7684\u6a21\u578b\u7ed3\u6784\u6765\u6784\u9020\u641c\u7d22\u7a7a\u95f4\u7684\u8bdd\uff0c\u4ec5\u9700\u8981\u6307\u5b9a\u641c\u7d22\u7a7a\u95f4\u540d\u5b57\u5373\u53ef\u3002\u4f8b\u5982\uff1a\u5982\u679c\u4f7f\u7528\u539f\u672c\u7684MobileNetV2\u7684\u641c\u7d22\u7a7a\u95f4\u8fdb\u884c\u641c\u7d22\u7684\u8bdd\uff0c\u4f20\u5165SANAS\u4e2d\u7684config\u76f4\u63a5\u6307\u5b9a\u4e3a[('MobileNetV2Space')]\u3002 \u4f7f\u7528paddleslim\u4e2d\u63d0\u4f9b\u7684block\u641c\u7d22\u7a7a\u95f4\u6784\u9020\u641c\u7d22\u7a7a\u95f4\uff1a 2.1 \u4f7f\u7528 input_size , output_size \u548c block_num \u6765\u6784\u9020\u641c\u7d22\u7a7a\u95f4\u3002\u4f8b\u5982\uff1a\u4f20\u5165SANAS\u7684config\u53ef\u4ee5\u6307\u5b9a\u4e3a[('MobileNetV2BlockSpace', {'input_size': 224, 'output_size': 32, 'block_num': 10})]\u3002 2.2 \u4f7f\u7528 block_mask \u6784\u9020\u641c\u7d22\u7a7a\u95f4\u3002\u4f8b\u5982\uff1a\u4f20\u5165SANAS\u7684config\u53ef\u4ee5\u6307\u5b9a\u4e3a[('MobileNetV2BlockSpace', {'block_mask': [0, 1, 1, 1, 1, 0, 1, 0]})]\u3002","title":"\u641c\u7d22\u7a7a\u95f4\u793a\u4f8b\uff1a"},{"location":"docs/api/search_space/#search-space","text":"\u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4\u7c7b\u9700\u8981\u7ee7\u627f\u641c\u7d22\u7a7a\u95f4\u57fa\u7c7b\u5e76\u91cd\u5199\u4ee5\u4e0b\u51e0\u90e8\u5206\uff1a 1. \u521d\u59cb\u5316\u7684tokens( init_tokens \u51fd\u6570)\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a\u81ea\u5df1\u60f3\u8981\u7684tokens\u5217\u8868, tokens\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u6570\u5b57\u6307\u7684\u662f\u5f53\u524d\u6570\u5b57\u5728\u76f8\u5e94\u7684\u641c\u7d22\u5217\u8868\u4e2d\u7684\u7d22\u5f15\u3002\u4f8b\u5982\u672c\u793a\u4f8b\u4e2d\u82e5tokens=[0, 3, 5]\uff0c\u5219\u4ee3\u8868\u5f53\u524d\u6a21\u578b\u7ed3\u6784\u641c\u7d22\u5230\u7684\u901a\u9053\u6570\u4e3a[8, 40, 128]\u3002 2. token\u4e2d\u6bcf\u4e2a\u6570\u5b57\u7684\u641c\u7d22\u5217\u8868\u957f\u5ea6( range_table \u51fd\u6570)\uff0ctokens\u4e2d\u6bcf\u4e2atoken\u7684\u7d22\u5f15\u8303\u56f4\u3002 3. \u6839\u636etoken\u4ea7\u751f\u6a21\u578b\u7ed3\u6784( token2arch \u51fd\u6570)\uff0c\u6839\u636e\u641c\u7d22\u5230\u7684tokens\u5217\u8868\u4ea7\u751f\u6a21\u578b\u7ed3\u6784\u3002 \u4ee5\u65b0\u589ereset block\u4e3a\u4f8b\u8bf4\u660e\u5982\u4f55\u6784\u9020\u81ea\u5df1\u7684search space\u3002\u81ea\u5b9a\u4e49\u7684search space\u4e0d\u80fd\u548c\u5df2\u6709\u7684search space\u540c\u540d\u3002 ### \u5f15\u5165\u641c\u7d22\u7a7a\u95f4\u57fa\u7c7b\u51fd\u6570\u548csearch space\u7684\u6ce8\u518c\u7c7b\u51fd\u6570 from .search_space_base import SearchSpaceBase from .search_space_registry import SEARCHSPACE import numpy as np ### \u9700\u8981\u8c03\u7528\u6ce8\u518c\u51fd\u6570\u628a\u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4\u6ce8\u518c\u5230space space\u4e2d @SEARCHSPACE.register ### \u5b9a\u4e49\u4e00\u4e2a\u7ee7\u627fSearchSpaceBase\u57fa\u7c7b\u7684\u641c\u7d22\u7a7a\u95f4\u7684\u7c7b\u51fd\u6570 class ResNetBlockSpace2(SearchSpaceBase): def __init__(self, input_size, output_size, block_num, block_mask): ### \u5b9a\u4e49\u4e00\u4e9b\u5b9e\u9645\u60f3\u8981\u641c\u7d22\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a\u901a\u9053\u6570\u3001\u6bcf\u4e2a\u5377\u79ef\u7684\u91cd\u590d\u6b21\u6570\u3001\u5377\u79ef\u6838\u5927\u5c0f\u7b49\u7b49 ### self.filter_num \u4ee3\u8868\u901a\u9053\u6570\u7684\u641c\u7d22\u5217\u8868 self.filter_num = np.array([8, 16, 32, 40, 64, 128, 256, 512]) ### \u5b9a\u4e49\u521d\u59cb\u5316token\uff0c\u521d\u59cb\u5316token\u7684\u957f\u5ea6\u6839\u636e\u4f20\u5165\u7684block_num\u6216\u8005block_mask\u7684\u957f\u5ea6\u6765\u5f97\u5230\u7684 def init_tokens(self): return [0] * 3 * len(self.block_mask) ### \u5b9a\u4e49 def range_table(self): return [len(self.filter_num)] * 3 * len(self.block_mask) def token2arch(self, tokens=None): if tokens == None: tokens = self.init_tokens() self.bottleneck_params_list = [] for i in range(len(self.block_mask)): self.bottleneck_params_list.append(self.filter_num[tokens[i * 3 + 0]], self.filter_num[tokens[i * 3 + 1]], self.filter_num[tokens[i * 3 + 2]], 2 if self.block_mask[i] == 1 else 1) def net_arch(input): for i, layer_setting in enumerate(self.bottleneck_params_list): channel_num, stride = layer_setting[:-1], layer_setting[-1] input = self._resnet_block(input, channel_num, stride, name='resnet_layer{}'.format(i+1)) return input return net_arch ### \u6784\u9020\u5177\u4f53block\u7684\u64cd\u4f5c def _resnet_block(self, input, channel_num, stride, name=None): shortcut_conv = self._shortcut(input, channel_num[2], stride, name=name) input = self._conv_bn_layer(input=input, num_filters=channel_num[0], filter_size=1, act='relu', name=name + '_conv0') input = self._conv_bn_layer(input=input, num_filters=channel_num[1], filter_size=3, stride=stride, act='relu', name=name + '_conv1') input = self._conv_bn_layer(input=input, num_filters=channel_num[2], filter_size=1, name=name + '_conv2') return fluid.layers.elementwise_add(x=shortcut_conv, y=input, axis=0, name=name+'_elementwise_add') def _shortcut(self, input, channel_num, stride, name=None): channel_in = input.shape[1] if channel_in != channel_num or stride != 1: return self.conv_bn_layer(input, num_filters=channel_num, filter_size=1, stride=stride, name=name+'_shortcut') else: return input def _conv_bn_layer(self, input, num_filters, filter_size, stride=1, padding='SAME', act=None, name=None): conv = fluid.layers.conv2d(input, num_filters, filter_size, stride, name=name+'_conv') bn = fluid.layers.batch_norm(conv, act=act, name=name+'_bn') return bn","title":"\u81ea\u5b9a\u4e49\u641c\u7d22\u7a7a\u95f4(search space)"},{"location":"docs/api/single_distiller_api/","text":"paddleslim.dist API\u6587\u6863 merge(teacher_program, student_program, data_name_map, place, scope=fluid.global_scope(), name_prefix='teacher_') \u8be5\u65b9\u6cd5\u5c06\u4e24\u4e2afluid program\uff08teacher_program, student_program\uff09\u878d\u5408\u4e3a\u4e00\u4e2aprogram\uff0c\u5e76\u5c06\u878d\u5408\u5f97\u5230\u7684program\u8fd4\u56de\u3002\u5728\u878d\u5408\u7684program\u4e2d\uff0c\u53ef\u4ee5\u4e3a\u5176\u4e2d\u5408\u9002\u7684teacher\u7279\u5f81\u56fe\u548cstudent\u7279\u5f81\u56fe\u6dfb\u52a0\u84b8\u998f\u635f\u5931\u51fd\u6570\uff0c\u4ece\u800c\u8fbe\u5230\u7528teacher\u6a21\u578b\u7684\u6697\u77e5\u8bc6\uff08Dark Knowledge\uff09\u6307\u5bfcstudent\u6a21\u578b\u5b66\u4e60\u7684\u76ee\u7684\u3002 \u53c2\u6570\uff1a teacher_program (Program)-\u5b9a\u4e49\u4e86teacher\u6a21\u578b\u7684paddle program student_program (Program)-\u5b9a\u4e49\u4e86student\u6a21\u578b\u7684paddle program data_name_map (dict)-teacher\u8f93\u5165\u63a5\u53e3\u540d\u4e0estudent\u8f93\u5165\u63a5\u53e3\u540d\u7684\u6620\u5c04\uff0ckey\u4e3ateacher\u7684\u8f93\u5165\u540d\uff0cvalue\u4e3astudent\u7684\u8f93\u5165\u540d\u3002merge\u51fd\u6570\u5c06\u4f1a\u628a\u8fd9\u4e24\u4e2a\u6a21\u578b\u7684\u8f93\u5165\u6309\u5bf9\u5e94\u5173\u7cfb\u5408\u5e76\u5728\u4e00\u8d77\uff0c\u4fdd\u8bc1teacher\u4e0estudent\u8f93\u5165\u6570\u636e\u76f8\u540c place (fluid.CPUPlace()|fluid.CUDAPlace(N))-\u8be5\u53c2\u6570\u8868\u793a\u7a0b\u5e8f\u8fd0\u884c\u5728\u4f55\u79cd\u8bbe\u5907\u4e0a\uff0c\u8fd9\u91cc\u7684N\u4e3aGPU\u5bf9\u5e94\u7684ID scope (Scope)-\u8be5\u53c2\u6570\u8868\u793ateacher variables\u548cstudent variables\u6240\u4f7f\u7528\u7684\u4f5c\u7528\u57df\uff0c\u5982\u679c\u4e0d\u6307\u5b9a\u5c06\u4f7f\u7528\u9ed8\u8ba4\u7684\u5168\u5c40\u4f5c\u7528\u57df\u3002\u9ed8\u8ba4\u503c\uff1afluid.global_scope() name_prefix (str)-\u4e3a\u4e86\u907f\u514dteacher variables\u548cstudent variables\u5b58\u5728\u540c\u540d\u53d8\u91cf\u800c\u5f15\u8d77\u547d\u540d\u51b2\u7a81\uff0cmerge\u51fd\u6570\u5c06\u7edf\u4e00\u4e3ateacher variables\u6dfb\u52a0\u4e00\u4e2a\u540d\u79f0\u524d\u7f00name_prefix\uff0cmerge\u540e\u7684program\u4e2d\u6240\u6709teacher variables\u90fd\u5c06\u5e26\u6709\u8fd9\u4e00\u540d\u79f0\u524d\u7f00\u3002\u9ed8\u8ba4\u503c\uff1a'teacher_' \u8fd4\u56de\uff1a \u7531student_program\u548cteacher_program merge\u5f97\u5230\u7684program \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1) out = fluid.layers.conv2d(conv, 64, 3, padding=1) teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1) conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1) data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = dist.merge(teacher_program, student_program, data_name_map, place) fsp_loss(teacher_var1_name, teacher_var2_name, student_var1_name, student_var2_name, program=fluid.default_main_program()) fsp_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0fsp loss\uff0c\u51fa\u81ea\u8bba\u6587 A Gift from Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning \u53c2\u6570\uff1a teacher_var1_name (str): teacher_var1\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, x_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64 teacher_var2_name (str): teacher_var2\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, y_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64\u3002\u53ea\u6709y_channel\u53ef\u4ee5\u4e0eteacher_var1\u7684x_channel\u4e0d\u540c\uff0c\u5176\u4ed6\u7ef4\u5ea6\u5fc5\u987b\u4e0eteacher_var1\u76f8\u540c student_var1_name (str): student_var1\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u9700\u4e0eteacher_var1\u5c3a\u5bf8\u4fdd\u6301\u4e00\u81f4\uff0c\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, x_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64 student_var2_name (str): student_var2\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u9700\u4e0eteacher_var2\u5c3a\u5bf8\u4fdd\u6301\u4e00\u81f4\uff0c\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, y_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64\u3002\u53ea\u6709y_channel\u53ef\u4ee5\u4e0estudent_var1\u7684x_channel\u4e0d\u540c\uff0c\u5176\u4ed6\u7ef4\u5ea6\u5fc5\u987b\u4e0estudent_var1\u76f8\u540c program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() \u8fd4\u56de\uff1a \u7531teacher_var1, teacher_var2, student_var1, student_var2\u7ec4\u5408\u5f97\u5230\u7684fsp_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.fsp_loss('teacher_t1.tmp_1', 'teacher_t2.tmp_1', 's1.tmp_1', 's2.tmp_1', main_program) l2_loss(teacher_var_name, student_var_name, program=fluid.default_main_program()) l2_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0l2 loss \u53c2\u6570\uff1a teacher_var_name (str): teacher_var\u7684\u540d\u79f0. student_var_name (str): student_var\u7684\u540d\u79f0. program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() \u8fd4\u56de\uff1a \u7531teacher_var, student_var\u7ec4\u5408\u5f97\u5230\u7684l2_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.l2_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program) soft_label_loss(teacher_var_name, student_var_name, program=fluid.default_main_program(), teacher_temperature=1., student_temperature=1.) soft_label_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0soft label loss\uff0c\u51fa\u81ea\u8bba\u6587 Distilling the Knowledge in a Neural Network \u53c2\u6570\uff1a teacher_var_name (str): teacher_var\u7684\u540d\u79f0. student_var_name (str): student_var\u7684\u540d\u79f0. program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() teacher_temperature (float): \u5bf9teacher_var\u8fdb\u884csoft\u64cd\u4f5c\u7684\u6e29\u5ea6\u503c\uff0c\u6e29\u5ea6\u503c\u8d8a\u5927\u5f97\u5230\u7684\u7279\u5f81\u56fe\u8d8a\u5e73\u6ed1 student_temperature (float): \u5bf9student_var\u8fdb\u884csoft\u64cd\u4f5c\u7684\u6e29\u5ea6\u503c\uff0c\u6e29\u5ea6\u503c\u8d8a\u5927\u5f97\u5230\u7684\u7279\u5f81\u56fe\u8d8a\u5e73\u6ed1 \u8fd4\u56de\uff1a \u7531teacher_var, student_var\u7ec4\u5408\u5f97\u5230\u7684soft_label_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.soft_label_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program, 1., 1.) loss(loss_func, program=fluid.default_main_program(), **kwargs) loss\u51fd\u6570\u652f\u6301\u5bf9\u4efb\u610f\u591a\u5bf9teacher_var\u548cstudent_var\u4f7f\u7528\u81ea\u5b9a\u4e49\u635f\u5931\u51fd\u6570 \u53c2\u6570\uff1a loss_func (python function): \u81ea\u5b9a\u4e49\u7684\u635f\u5931\u51fd\u6570\uff0c\u8f93\u5165\u4e3ateacher var\u548cstudent var\uff0c\u8f93\u51fa\u4e3a\u81ea\u5b9a\u4e49\u7684loss program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() **kwargs : loss_func\u8f93\u5165\u540d\u4e0e\u5bf9\u5e94variable\u540d\u79f0 \u8fd4\u56de \uff1a\u81ea\u5b9a\u4e49\u7684\u635f\u5931\u51fd\u6570loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) def adaptation_loss(t_var, s_var): teacher_channel = t_var.shape[1] s_hint = fluid.layers.conv2d(s_var, teacher_channel, 1) hint_loss = fluid.layers.reduce_mean(fluid.layers.square(s_hint - t_var)) return hint_loss with fluid.program_guard(main_program): distillation_loss = dist.loss(main_program, adaptation_loss, t_var='teacher_t2.tmp_1', s_var='s2.tmp_1') \u6ce8\u610f\u4e8b\u9879 \u5728\u6dfb\u52a0\u84b8\u998floss\u65f6\u4f1a\u5f15\u5165\u65b0\u7684variable\uff0c\u9700\u8981\u6ce8\u610f\u65b0\u5f15\u5165\u7684variable\u4e0d\u8981\u4e0estudent variables\u547d\u540d\u51b2\u7a81\u3002\u8fd9\u91cc\u5efa\u8bae\u4e24\u79cd\u7528\u6cd5\uff1a \u5efa\u8bae\u4e0estudent_program\u4f7f\u7528\u540c\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\uff0c\u4ee5\u907f\u514d\u4e00\u4e9b\u672a\u6307\u5b9a\u540d\u79f0\u7684variables(\u4f8b\u5982tmp_0, tmp_1...)\u591a\u6b21\u5b9a\u4e49\u4e3a\u540c\u4e00\u540d\u79f0\u51fa\u73b0\u547d\u540d\u51b2\u7a81 \u5efa\u8bae\u5728\u6dfb\u52a0\u84b8\u998floss\u65f6\u6307\u5b9a\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\u524d\u7f00\uff0c\u5177\u4f53\u7528\u6cd5\u8bf7\u53c2\u8003Paddle\u5b98\u65b9\u6587\u6863 fluid.name_scope","title":"paddleslim.dist API\u6587\u6863"},{"location":"docs/api/single_distiller_api/#paddleslimdist-api","text":"","title":"paddleslim.dist API\u6587\u6863"},{"location":"docs/api/single_distiller_api/#mergeteacher_program-student_program-data_name_map-place-scopefluidglobal_scope-name_prefixteacher_","text":"\u8be5\u65b9\u6cd5\u5c06\u4e24\u4e2afluid program\uff08teacher_program, student_program\uff09\u878d\u5408\u4e3a\u4e00\u4e2aprogram\uff0c\u5e76\u5c06\u878d\u5408\u5f97\u5230\u7684program\u8fd4\u56de\u3002\u5728\u878d\u5408\u7684program\u4e2d\uff0c\u53ef\u4ee5\u4e3a\u5176\u4e2d\u5408\u9002\u7684teacher\u7279\u5f81\u56fe\u548cstudent\u7279\u5f81\u56fe\u6dfb\u52a0\u84b8\u998f\u635f\u5931\u51fd\u6570\uff0c\u4ece\u800c\u8fbe\u5230\u7528teacher\u6a21\u578b\u7684\u6697\u77e5\u8bc6\uff08Dark Knowledge\uff09\u6307\u5bfcstudent\u6a21\u578b\u5b66\u4e60\u7684\u76ee\u7684\u3002 \u53c2\u6570\uff1a teacher_program (Program)-\u5b9a\u4e49\u4e86teacher\u6a21\u578b\u7684paddle program student_program (Program)-\u5b9a\u4e49\u4e86student\u6a21\u578b\u7684paddle program data_name_map (dict)-teacher\u8f93\u5165\u63a5\u53e3\u540d\u4e0estudent\u8f93\u5165\u63a5\u53e3\u540d\u7684\u6620\u5c04\uff0ckey\u4e3ateacher\u7684\u8f93\u5165\u540d\uff0cvalue\u4e3astudent\u7684\u8f93\u5165\u540d\u3002merge\u51fd\u6570\u5c06\u4f1a\u628a\u8fd9\u4e24\u4e2a\u6a21\u578b\u7684\u8f93\u5165\u6309\u5bf9\u5e94\u5173\u7cfb\u5408\u5e76\u5728\u4e00\u8d77\uff0c\u4fdd\u8bc1teacher\u4e0estudent\u8f93\u5165\u6570\u636e\u76f8\u540c place (fluid.CPUPlace()|fluid.CUDAPlace(N))-\u8be5\u53c2\u6570\u8868\u793a\u7a0b\u5e8f\u8fd0\u884c\u5728\u4f55\u79cd\u8bbe\u5907\u4e0a\uff0c\u8fd9\u91cc\u7684N\u4e3aGPU\u5bf9\u5e94\u7684ID scope (Scope)-\u8be5\u53c2\u6570\u8868\u793ateacher variables\u548cstudent variables\u6240\u4f7f\u7528\u7684\u4f5c\u7528\u57df\uff0c\u5982\u679c\u4e0d\u6307\u5b9a\u5c06\u4f7f\u7528\u9ed8\u8ba4\u7684\u5168\u5c40\u4f5c\u7528\u57df\u3002\u9ed8\u8ba4\u503c\uff1afluid.global_scope() name_prefix (str)-\u4e3a\u4e86\u907f\u514dteacher variables\u548cstudent variables\u5b58\u5728\u540c\u540d\u53d8\u91cf\u800c\u5f15\u8d77\u547d\u540d\u51b2\u7a81\uff0cmerge\u51fd\u6570\u5c06\u7edf\u4e00\u4e3ateacher variables\u6dfb\u52a0\u4e00\u4e2a\u540d\u79f0\u524d\u7f00name_prefix\uff0cmerge\u540e\u7684program\u4e2d\u6240\u6709teacher variables\u90fd\u5c06\u5e26\u6709\u8fd9\u4e00\u540d\u79f0\u524d\u7f00\u3002\u9ed8\u8ba4\u503c\uff1a'teacher_' \u8fd4\u56de\uff1a \u7531student_program\u548cteacher_program merge\u5f97\u5230\u7684program \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1) out = fluid.layers.conv2d(conv, 64, 3, padding=1) teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1) conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1) data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = dist.merge(teacher_program, student_program, data_name_map, place)","title":"merge(teacher_program, student_program, data_name_map, place, scope=fluid.global_scope(), name_prefix='teacher_')"},{"location":"docs/api/single_distiller_api/#fsp_lossteacher_var1_name-teacher_var2_name-student_var1_name-student_var2_name-programfluiddefault_main_program","text":"fsp_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0fsp loss\uff0c\u51fa\u81ea\u8bba\u6587 A Gift from Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning \u53c2\u6570\uff1a teacher_var1_name (str): teacher_var1\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, x_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64 teacher_var2_name (str): teacher_var2\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, y_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64\u3002\u53ea\u6709y_channel\u53ef\u4ee5\u4e0eteacher_var1\u7684x_channel\u4e0d\u540c\uff0c\u5176\u4ed6\u7ef4\u5ea6\u5fc5\u987b\u4e0eteacher_var1\u76f8\u540c student_var1_name (str): student_var1\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u9700\u4e0eteacher_var1\u5c3a\u5bf8\u4fdd\u6301\u4e00\u81f4\uff0c\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, x_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64 student_var2_name (str): student_var2\u7684\u540d\u79f0. \u5bf9\u5e94\u7684variable\u9700\u4e0eteacher_var2\u5c3a\u5bf8\u4fdd\u6301\u4e00\u81f4\uff0c\u662f\u4e00\u4e2a\u5f62\u4e3a [batch_size, y_channel, height, width] \u76844-D\u7279\u5f81\u56feTensor\uff0c\u6570\u636e\u7c7b\u578b\u4e3afloat32\u6216float64\u3002\u53ea\u6709y_channel\u53ef\u4ee5\u4e0estudent_var1\u7684x_channel\u4e0d\u540c\uff0c\u5176\u4ed6\u7ef4\u5ea6\u5fc5\u987b\u4e0estudent_var1\u76f8\u540c program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() \u8fd4\u56de\uff1a \u7531teacher_var1, teacher_var2, student_var1, student_var2\u7ec4\u5408\u5f97\u5230\u7684fsp_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.fsp_loss('teacher_t1.tmp_1', 'teacher_t2.tmp_1', 's1.tmp_1', 's2.tmp_1', main_program)","title":"fsp_loss(teacher_var1_name, teacher_var2_name, student_var1_name, student_var2_name, program=fluid.default_main_program())"},{"location":"docs/api/single_distiller_api/#l2_lossteacher_var_name-student_var_name-programfluiddefault_main_program","text":"l2_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0l2 loss \u53c2\u6570\uff1a teacher_var_name (str): teacher_var\u7684\u540d\u79f0. student_var_name (str): student_var\u7684\u540d\u79f0. program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() \u8fd4\u56de\uff1a \u7531teacher_var, student_var\u7ec4\u5408\u5f97\u5230\u7684l2_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.l2_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program)","title":"l2_loss(teacher_var_name, student_var_name, program=fluid.default_main_program())"},{"location":"docs/api/single_distiller_api/#soft_label_lossteacher_var_name-student_var_name-programfluiddefault_main_program-teacher_temperature1-student_temperature1","text":"soft_label_loss\u4e3aprogram\u5185\u7684teacher var\u548cstudent var\u6dfb\u52a0soft label loss\uff0c\u51fa\u81ea\u8bba\u6587 Distilling the Knowledge in a Neural Network \u53c2\u6570\uff1a teacher_var_name (str): teacher_var\u7684\u540d\u79f0. student_var_name (str): student_var\u7684\u540d\u79f0. program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() teacher_temperature (float): \u5bf9teacher_var\u8fdb\u884csoft\u64cd\u4f5c\u7684\u6e29\u5ea6\u503c\uff0c\u6e29\u5ea6\u503c\u8d8a\u5927\u5f97\u5230\u7684\u7279\u5f81\u56fe\u8d8a\u5e73\u6ed1 student_temperature (float): \u5bf9student_var\u8fdb\u884csoft\u64cd\u4f5c\u7684\u6e29\u5ea6\u503c\uff0c\u6e29\u5ea6\u503c\u8d8a\u5927\u5f97\u5230\u7684\u7279\u5f81\u56fe\u8d8a\u5e73\u6ed1 \u8fd4\u56de\uff1a \u7531teacher_var, student_var\u7ec4\u5408\u5f97\u5230\u7684soft_label_loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) with fluid.program_guard(main_program): distillation_loss = dist.soft_label_loss('teacher_t2.tmp_1', 's2.tmp_1', main_program, 1., 1.)","title":"soft_label_loss(teacher_var_name, student_var_name, program=fluid.default_main_program(), teacher_temperature=1., student_temperature=1.)"},{"location":"docs/api/single_distiller_api/#lossloss_func-programfluiddefault_main_program-kwargs","text":"loss\u51fd\u6570\u652f\u6301\u5bf9\u4efb\u610f\u591a\u5bf9teacher_var\u548cstudent_var\u4f7f\u7528\u81ea\u5b9a\u4e49\u635f\u5931\u51fd\u6570 \u53c2\u6570\uff1a loss_func (python function): \u81ea\u5b9a\u4e49\u7684\u635f\u5931\u51fd\u6570\uff0c\u8f93\u5165\u4e3ateacher var\u548cstudent var\uff0c\u8f93\u51fa\u4e3a\u81ea\u5b9a\u4e49\u7684loss program (Program): \u7528\u4e8e\u84b8\u998f\u8bad\u7ec3\u7684fluid program\u3002\u9ed8\u8ba4\u503c\uff1afluid.default_main_program() **kwargs : loss_func\u8f93\u5165\u540d\u4e0e\u5bf9\u5e94variable\u540d\u79f0 \u8fd4\u56de \uff1a\u81ea\u5b9a\u4e49\u7684\u635f\u5931\u51fd\u6570loss \u4f7f\u7528\u793a\u4f8b\uff1a import paddle.fluid as fluid import paddleslim.dist as dist student_program = fluid.Program() with fluid.program_guard(student_program): x = fluid.layers.data(name='x', shape=[1, 28, 28]) conv = fluid.layers.conv2d(x, 32, 1, name='s1') out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='s2') teacher_program = fluid.Program() with fluid.program_guard(teacher_program): y = fluid.layers.data(name='y', shape=[1, 28, 28]) conv = fluid.layers.conv2d(y, 32, 1, name='t1') conv = fluid.layers.conv2d(conv, 32, 3, padding=1) out = fluid.layers.conv2d(conv, 64, 3, padding=1, name='t2') data_name_map = {'y':'x'} USE_GPU = False place = fluid.CUDAPlace(0) if USE_GPU else fluid.CPUPlace() main_program = merge(teacher_program, student_program, data_name_map, place) def adaptation_loss(t_var, s_var): teacher_channel = t_var.shape[1] s_hint = fluid.layers.conv2d(s_var, teacher_channel, 1) hint_loss = fluid.layers.reduce_mean(fluid.layers.square(s_hint - t_var)) return hint_loss with fluid.program_guard(main_program): distillation_loss = dist.loss(main_program, adaptation_loss, t_var='teacher_t2.tmp_1', s_var='s2.tmp_1')","title":"loss(loss_func, program=fluid.default_main_program(), **kwargs)"},{"location":"docs/api/single_distiller_api/#_1","text":"\u5728\u6dfb\u52a0\u84b8\u998floss\u65f6\u4f1a\u5f15\u5165\u65b0\u7684variable\uff0c\u9700\u8981\u6ce8\u610f\u65b0\u5f15\u5165\u7684variable\u4e0d\u8981\u4e0estudent variables\u547d\u540d\u51b2\u7a81\u3002\u8fd9\u91cc\u5efa\u8bae\u4e24\u79cd\u7528\u6cd5\uff1a \u5efa\u8bae\u4e0estudent_program\u4f7f\u7528\u540c\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\uff0c\u4ee5\u907f\u514d\u4e00\u4e9b\u672a\u6307\u5b9a\u540d\u79f0\u7684variables(\u4f8b\u5982tmp_0, tmp_1...)\u591a\u6b21\u5b9a\u4e49\u4e3a\u540c\u4e00\u540d\u79f0\u51fa\u73b0\u547d\u540d\u51b2\u7a81 \u5efa\u8bae\u5728\u6dfb\u52a0\u84b8\u998floss\u65f6\u6307\u5b9a\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\u524d\u7f00\uff0c\u5177\u4f53\u7528\u6cd5\u8bf7\u53c2\u8003Paddle\u5b98\u65b9\u6587\u6863 fluid.name_scope","title":"\u6ce8\u610f\u4e8b\u9879"},{"location":"docs/tutorials/demo_guide/","text":"\u84b8\u998f \u84b8\u998fdemo\u9ed8\u8ba4\u4f7f\u7528ResNet50\u4f5c\u4e3ateacher\u7f51\u7edc\uff0cMobileNet\u4f5c\u4e3astudent\u7f51\u7edc\uff0c\u6b64\u5916\u8fd8\u652f\u6301\u5c06teacher\u548cstudent\u6362\u6210 models\u76ee\u5f55 \u652f\u6301\u7684\u4efb\u610f\u6a21\u578b\u3002 demo\u4e2d\u5bf9teahcer\u6a21\u578b\u548cstudent\u6a21\u578b\u7684\u4e00\u5c42\u7279\u5f81\u56fe\u6dfb\u52a0\u4e86l2_loss\u7684\u84b8\u998f\u635f\u5931\u51fd\u6570\uff0c\u4f7f\u7528\u65f6\u4e5f\u53ef\u6839\u636e\u9700\u8981\u9009\u62e9fsp_loss, soft_label_loss\u4ee5\u53ca\u81ea\u5b9a\u4e49\u7684loss\u51fd\u6570\u3002 \u8bad\u7ec3\u9ed8\u8ba4\u4f7f\u7528\u7684\u662fcifar10\u6570\u636e\u96c6\uff0cpiecewise_decay\u5b66\u4e60\u7387\u8870\u51cf\u7b56\u7565\uff0cmomentum\u4f18\u5316\u5668\u8fdb\u884c120\u8f6e\u84b8\u998f\u8bad\u7ec3\u3002\u4f7f\u7528\u8005\u4e5f\u53ef\u4ee5\u7b80\u5355\u5730\u7528args\u53c2\u6570\u5207\u6362\u4e3a\u4f7f\u7528ImageNet\u6570\u636e\u96c6\uff0ccosine_decay\u5b66\u4e60\u7387\u8870\u51cf\u7b56\u7565\u7b49\u5176\u4ed6\u8bad\u7ec3\u914d\u7f6e\u3002 \u91cf\u5316 \u91cf\u5316\u8bad\u7ec3demo\u6587\u6863 \u79bb\u7ebf\u91cf\u5316demo\u6587\u6863 Embedding\u91cf\u5316demo\u6587\u6863 NAS NAS\u793a\u4f8b","title":"Demo guide"},{"location":"docs/tutorials/demo_guide/#_1","text":"\u84b8\u998fdemo\u9ed8\u8ba4\u4f7f\u7528ResNet50\u4f5c\u4e3ateacher\u7f51\u7edc\uff0cMobileNet\u4f5c\u4e3astudent\u7f51\u7edc\uff0c\u6b64\u5916\u8fd8\u652f\u6301\u5c06teacher\u548cstudent\u6362\u6210 models\u76ee\u5f55 \u652f\u6301\u7684\u4efb\u610f\u6a21\u578b\u3002 demo\u4e2d\u5bf9teahcer\u6a21\u578b\u548cstudent\u6a21\u578b\u7684\u4e00\u5c42\u7279\u5f81\u56fe\u6dfb\u52a0\u4e86l2_loss\u7684\u84b8\u998f\u635f\u5931\u51fd\u6570\uff0c\u4f7f\u7528\u65f6\u4e5f\u53ef\u6839\u636e\u9700\u8981\u9009\u62e9fsp_loss, soft_label_loss\u4ee5\u53ca\u81ea\u5b9a\u4e49\u7684loss\u51fd\u6570\u3002 \u8bad\u7ec3\u9ed8\u8ba4\u4f7f\u7528\u7684\u662fcifar10\u6570\u636e\u96c6\uff0cpiecewise_decay\u5b66\u4e60\u7387\u8870\u51cf\u7b56\u7565\uff0cmomentum\u4f18\u5316\u5668\u8fdb\u884c120\u8f6e\u84b8\u998f\u8bad\u7ec3\u3002\u4f7f\u7528\u8005\u4e5f\u53ef\u4ee5\u7b80\u5355\u5730\u7528args\u53c2\u6570\u5207\u6362\u4e3a\u4f7f\u7528ImageNet\u6570\u636e\u96c6\uff0ccosine_decay\u5b66\u4e60\u7387\u8870\u51cf\u7b56\u7565\u7b49\u5176\u4ed6\u8bad\u7ec3\u914d\u7f6e\u3002","title":"\u84b8\u998f"},{"location":"docs/tutorials/demo_guide/#_2","text":"","title":"\u91cf\u5316"},{"location":"docs/tutorials/demo_guide/#demo","text":"","title":"\u91cf\u5316\u8bad\u7ec3demo\u6587\u6863"},{"location":"docs/tutorials/demo_guide/#demo_1","text":"","title":"\u79bb\u7ebf\u91cf\u5316demo\u6587\u6863"},{"location":"docs/tutorials/demo_guide/#embeddingdemo","text":"","title":"Embedding\u91cf\u5316demo\u6587\u6863"},{"location":"docs/tutorials/demo_guide/#nas","text":"","title":"NAS"},{"location":"docs/tutorials/demo_guide/#nas_1","text":"","title":"NAS\u793a\u4f8b"},{"location":"docs/tutorials/nas_demo/","text":"\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u793a\u4f8b \u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u63a5\u53e3\uff0c\u641c\u7d22\u5230\u4e00\u4e2a\u66f4\u5c0f\u6216\u8005\u7cbe\u5ea6\u66f4\u9ad8\u7684\u6a21\u578b\uff0c\u8be5\u6587\u6863\u4ec5\u4ecb\u7ecdpaddleslim\u4e2dSANAS\u7684\u4f7f\u7528\u53ca\u5982\u4f55\u5229\u7528SANAS\u5f97\u5230\u6a21\u578b\u7ed3\u6784\uff0c\u5b8c\u6574\u793a\u4f8b\u4ee3\u7801\u8bf7\u53c2\u8003sa_nas_mobilenetv2.py\u6216\u8005block_sa_nas_mobilenetv2.py\u3002 \u63a5\u53e3\u4ecb\u7ecd \u8bf7\u53c2\u8003\u3002 1. \u914d\u7f6e\u641c\u7d22\u7a7a\u95f4 \u8be6\u7ec6\u7684\u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003 \u795e\u7ecf\u7f51\u7edc\u641c\u7d22API\u6587\u6863 \u3002 config = [('MobileNetV2Space')] 2. \u5229\u7528\u641c\u7d22\u7a7a\u95f4\u521d\u59cb\u5316SANAS\u5b9e\u4f8b from paddleslim.nas import SANAS sa_nas = SANAS( config, server_addr=(\"\", 8881), init_temperature=10.24, reduce_rate=0.85, search_steps=300, is_server=True) 3. \u6839\u636e\u5b9e\u4f8b\u5316\u7684NAS\u5f97\u5230\u5f53\u524d\u7684\u7f51\u7edc\u7ed3\u6784 archs = sa_nas.next_archs() 4. \u6839\u636e\u5f97\u5230\u7684\u7f51\u7edc\u7ed3\u6784\u548c\u8f93\u5165\u6784\u9020\u8bad\u7ec3\u548c\u6d4b\u8bd5program import paddle.fluid as fluid train_program = fluid.Program() test_program = fluid.Program() startup_program = fluid.Program() with fluid.program_guard(train_program, startup_program): data = fluid.data(name='data', shape=[None, 3, 32, 32], dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') for arch in archs: data = arch(data) output = fluid.layers.fc(data, 10) softmax_out = fluid.layers.softmax(input=output, use_cudnn=False) cost = fluid.layers.cross_entropy(input=softmax_out, label=label) avg_cost = fluid.layers.mean(cost) acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1) test_program = train_program.clone(for_test=True) sgd = fluid.optimizer.SGD(learning_rate=1e-3) sgd.minimize(avg_cost) 5. \u6839\u636e\u6784\u9020\u7684\u8bad\u7ec3program\u6dfb\u52a0\u9650\u5236\u6761\u4ef6 from paddleslim.analysis import flops if flops(train_program) > 321208544: continue 6. \u56de\u4f20score sa_nas.reward(score)","title":"\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u793a\u4f8b"},{"location":"docs/tutorials/nas_demo/#_1","text":"\u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u63a5\u53e3\uff0c\u641c\u7d22\u5230\u4e00\u4e2a\u66f4\u5c0f\u6216\u8005\u7cbe\u5ea6\u66f4\u9ad8\u7684\u6a21\u578b\uff0c\u8be5\u6587\u6863\u4ec5\u4ecb\u7ecdpaddleslim\u4e2dSANAS\u7684\u4f7f\u7528\u53ca\u5982\u4f55\u5229\u7528SANAS\u5f97\u5230\u6a21\u578b\u7ed3\u6784\uff0c\u5b8c\u6574\u793a\u4f8b\u4ee3\u7801\u8bf7\u53c2\u8003sa_nas_mobilenetv2.py\u6216\u8005block_sa_nas_mobilenetv2.py\u3002","title":"\u7f51\u7edc\u7ed3\u6784\u641c\u7d22\u793a\u4f8b"},{"location":"docs/tutorials/nas_demo/#_2","text":"\u8bf7\u53c2\u8003\u3002","title":"\u63a5\u53e3\u4ecb\u7ecd"},{"location":"docs/tutorials/nas_demo/#1","text":"\u8be6\u7ec6\u7684\u641c\u7d22\u7a7a\u95f4\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003 \u795e\u7ecf\u7f51\u7edc\u641c\u7d22API\u6587\u6863 \u3002 config = [('MobileNetV2Space')]","title":"1. \u914d\u7f6e\u641c\u7d22\u7a7a\u95f4"},{"location":"docs/tutorials/nas_demo/#2-sanas","text":"from paddleslim.nas import SANAS sa_nas = SANAS( config, server_addr=(\"\", 8881), init_temperature=10.24, reduce_rate=0.85, search_steps=300, is_server=True)","title":"2. \u5229\u7528\u641c\u7d22\u7a7a\u95f4\u521d\u59cb\u5316SANAS\u5b9e\u4f8b"},{"location":"docs/tutorials/nas_demo/#3-nas","text":"archs = sa_nas.next_archs()","title":"3. \u6839\u636e\u5b9e\u4f8b\u5316\u7684NAS\u5f97\u5230\u5f53\u524d\u7684\u7f51\u7edc\u7ed3\u6784"},{"location":"docs/tutorials/nas_demo/#4-program","text":"import paddle.fluid as fluid train_program = fluid.Program() test_program = fluid.Program() startup_program = fluid.Program() with fluid.program_guard(train_program, startup_program): data = fluid.data(name='data', shape=[None, 3, 32, 32], dtype='float32') label = fluid.data(name='label', shape=[None, 1], dtype='int64') for arch in archs: data = arch(data) output = fluid.layers.fc(data, 10) softmax_out = fluid.layers.softmax(input=output, use_cudnn=False) cost = fluid.layers.cross_entropy(input=softmax_out, label=label) avg_cost = fluid.layers.mean(cost) acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1) test_program = train_program.clone(for_test=True) sgd = fluid.optimizer.SGD(learning_rate=1e-3) sgd.minimize(avg_cost)","title":"4. \u6839\u636e\u5f97\u5230\u7684\u7f51\u7edc\u7ed3\u6784\u548c\u8f93\u5165\u6784\u9020\u8bad\u7ec3\u548c\u6d4b\u8bd5program"},{"location":"docs/tutorials/nas_demo/#5-program","text":"from paddleslim.analysis import flops if flops(train_program) > 321208544: continue","title":"5. \u6839\u636e\u6784\u9020\u7684\u8bad\u7ec3program\u6dfb\u52a0\u9650\u5236\u6761\u4ef6"},{"location":"docs/tutorials/nas_demo/#6-score","text":"sa_nas.reward(score)","title":"6. \u56de\u4f20score"},{"location":"docs/tutorials/quant_aware_demo/","text":"\u5728\u7ebf\u91cf\u5316\u793a\u4f8b \u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u5728\u7ebf\u91cf\u5316\u63a5\u53e3\uff0c\u6765\u5bf9\u8bad\u7ec3\u597d\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u91cf\u5316, \u53ef\u4ee5\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002 \u63a5\u53e3\u4ecb\u7ecd \u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002 \u5206\u7c7b\u6a21\u578b\u7684\u79bb\u7ebf\u91cf\u5316\u6d41\u7a0b 1. \u914d\u7f6e\u91cf\u5316\u53c2\u6570 quant_config = { 'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'moving_average_abs_max', 'weight_bits': 8, 'activation_bits': 8, 'not_quant_pattern': ['skip_quant'], 'quantize_op_types': ['conv2d', 'depthwise_conv2d', 'mul'], 'dtype': 'int8', 'window_size': 10000, 'moving_rate': 0.9, 'quant_weight_only': False } 2. \u5bf9\u8bad\u7ec3\u548c\u6d4b\u8bd5program\u63d2\u5165\u53ef\u8bad\u7ec3\u91cf\u5316op val_program = quant_aware(val_program, place, quant_config, scope=None, for_test=True) compiled_train_prog = quant_aware(train_prog, place, quant_config, scope=None, for_test=False) 3.\u5173\u6389\u6307\u5b9abuild\u7b56\u7565 build_strategy = fluid.BuildStrategy() build_strategy.fuse_all_reduce_ops = False build_strategy.sync_batch_norm = False exec_strategy = fluid.ExecutionStrategy() compiled_train_prog = compiled_train_prog.with_data_parallel( loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy) 4. freeze program float_program, int8_program = convert(val_program, place, quant_config, scope=None, save_int8=True) 5.\u4fdd\u5b58\u9884\u6d4b\u6a21\u578b fluid.io.save_inference_model( dirname=float_path, feeded_var_names=[image.name], target_vars=[out], executor=exe, main_program=float_program, model_filename=float_path + '/model', params_filename=float_path + '/params') fluid.io.save_inference_model( dirname=int8_path, feeded_var_names=[image.name], target_vars=[out], executor=exe, main_program=int8_program, model_filename=int8_path + '/model', params_filename=int8_path + '/params')","title":"\u5728\u7ebf\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_aware_demo/#_1","text":"\u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u5728\u7ebf\u91cf\u5316\u63a5\u53e3\uff0c\u6765\u5bf9\u8bad\u7ec3\u597d\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u91cf\u5316, \u53ef\u4ee5\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002","title":"\u5728\u7ebf\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_aware_demo/#_2","text":"\u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002","title":"\u63a5\u53e3\u4ecb\u7ecd"},{"location":"docs/tutorials/quant_aware_demo/#_3","text":"","title":"\u5206\u7c7b\u6a21\u578b\u7684\u79bb\u7ebf\u91cf\u5316\u6d41\u7a0b"},{"location":"docs/tutorials/quant_aware_demo/#1","text":"quant_config = { 'weight_quantize_type': 'abs_max', 'activation_quantize_type': 'moving_average_abs_max', 'weight_bits': 8, 'activation_bits': 8, 'not_quant_pattern': ['skip_quant'], 'quantize_op_types': ['conv2d', 'depthwise_conv2d', 'mul'], 'dtype': 'int8', 'window_size': 10000, 'moving_rate': 0.9, 'quant_weight_only': False }","title":"1. \u914d\u7f6e\u91cf\u5316\u53c2\u6570"},{"location":"docs/tutorials/quant_aware_demo/#2-programop","text":"val_program = quant_aware(val_program, place, quant_config, scope=None, for_test=True) compiled_train_prog = quant_aware(train_prog, place, quant_config, scope=None, for_test=False)","title":"2. \u5bf9\u8bad\u7ec3\u548c\u6d4b\u8bd5program\u63d2\u5165\u53ef\u8bad\u7ec3\u91cf\u5316op"},{"location":"docs/tutorials/quant_aware_demo/#3build","text":"build_strategy = fluid.BuildStrategy() build_strategy.fuse_all_reduce_ops = False build_strategy.sync_batch_norm = False exec_strategy = fluid.ExecutionStrategy() compiled_train_prog = compiled_train_prog.with_data_parallel( loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy)","title":"3.\u5173\u6389\u6307\u5b9abuild\u7b56\u7565"},{"location":"docs/tutorials/quant_aware_demo/#4-freeze-program","text":"float_program, int8_program = convert(val_program, place, quant_config, scope=None, save_int8=True)","title":"4. freeze program"},{"location":"docs/tutorials/quant_aware_demo/#5","text":"fluid.io.save_inference_model( dirname=float_path, feeded_var_names=[image.name], target_vars=[out], executor=exe, main_program=float_program, model_filename=float_path + '/model', params_filename=float_path + '/params') fluid.io.save_inference_model( dirname=int8_path, feeded_var_names=[image.name], target_vars=[out], executor=exe, main_program=int8_program, model_filename=int8_path + '/model', params_filename=int8_path + '/params')","title":"5.\u4fdd\u5b58\u9884\u6d4b\u6a21\u578b"},{"location":"docs/tutorials/quant_embedding_demo/","text":"Embedding\u91cf\u5316\u793a\u4f8b \u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Embedding\u91cf\u5316\u7684\u63a5\u53e3 paddleslim.quant.quant_embedding \u3002 quant_embedding \u63a5\u53e3\u5c06\u7f51\u7edc\u4e2d\u7684Embedding\u53c2\u6570\u4ece float32 \u7c7b\u578b\u91cf\u5316\u5230 8-bit \u6574\u6570\u7c7b\u578b\uff0c\u5728\u51e0\u4e4e\u4e0d\u635f\u5931\u6a21\u578b\u7cbe\u5ea6\u7684\u60c5\u51b5\u4e0b\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002 \u63a5\u53e3\u4ecb\u7ecd\u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002 \u8be5\u63a5\u53e3\u5bf9program\u7684\u4fee\u6539\uff1a \u91cf\u5316\u524d: \u56fe1\uff1a\u91cf\u5316\u524d\u7684\u6a21\u578b\u7ed3\u6784 \u91cf\u5316\u540e\uff1a \u56fe2: \u91cf\u5316\u540e\u7684\u6a21\u578b\u7ed3\u6784 \u4ee5\u4e0b\u5c06\u4ee5 \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u4e3a\u4f8b\u6765\u8bf4\u660e\u5982\u4f55\u4f7f\u7528 quant_embedding \u63a5\u53e3\u3002\u9996\u5148\u4ecb\u7ecd \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u7684\u6b63\u5e38\u8bad\u7ec3\u548c\u6d4b\u8bd5\u6d41\u7a0b\u3002 \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u4ee5\u4e0b\u662f\u672c\u4f8b\u7684\u7b80\u8981\u76ee\u5f55\u7ed3\u6784\u53ca\u8bf4\u660e\uff1a . \u251c\u2500\u2500 cluster_train.py # \u5206\u5e03\u5f0f\u8bad\u7ec3\u51fd\u6570 \u251c\u2500\u2500 cluster_train.sh # \u672c\u5730\u6a21\u62df\u591a\u673a\u811a\u672c \u251c\u2500\u2500 train.py # \u8bad\u7ec3\u51fd\u6570 \u251c\u2500\u2500 infer.py # \u9884\u6d4b\u811a\u672c \u251c\u2500\u2500 net.py # \u7f51\u7edc\u7ed3\u6784 \u251c\u2500\u2500 preprocess.py # \u9884\u5904\u7406\u811a\u672c\uff0c\u5305\u62ec\u6784\u5efa\u8bcd\u5178\u548c\u9884\u5904\u7406\u6587\u672c \u251c\u2500\u2500 reader.py # \u8bad\u7ec3\u9636\u6bb5\u7684\u6587\u672c\u8bfb\u5199 \u251c\u2500\u2500 train.py # \u8bad\u7ec3\u51fd\u6570 \u2514\u2500\u2500 utils.py # \u901a\u7528\u51fd\u6570 \u4ecb\u7ecd \u672c\u4f8b\u5b9e\u73b0\u4e86skip-gram\u6a21\u5f0f\u7684word2vector\u6a21\u578b\u3002 \u540c\u65f6\u63a8\u8350\u7528\u6237\u53c2\u8003 IPython Notebook demo \u6570\u636e\u4e0b\u8f7d \u5168\u91cf\u6570\u636e\u96c6\u4f7f\u7528\u7684\u662f\u6765\u81ea1 Billion Word Language Model Benchmark\u7684(http://www.statmt.org/lm-benchmark) \u7684\u6570\u636e\u96c6. mkdir data wget http://www.statmt.org/lm-benchmark/1-billion-word-language-modeling-benchmark-r13output.tar.gz tar xzvf 1-billion-word-language-modeling-benchmark-r13output.tar.gz mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/ \u5907\u7528\u6570\u636e\u5730\u5740\u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b mkdir data wget https://paddlerec.bj.bcebos.com/word2vec/1-billion-word-language-modeling-benchmark-r13output.tar tar xvf 1-billion-word-language-modeling-benchmark-r13output.tar mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/ \u4e3a\u4e86\u65b9\u4fbf\u5feb\u901f\u9a8c\u8bc1\uff0c\u6211\u4eec\u4e5f\u63d0\u4f9b\u4e86\u7ecf\u5178\u7684text8\u6837\u4f8b\u6570\u636e\u96c6\uff0c\u5305\u542b1700w\u4e2a\u8bcd\u3002 \u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b mkdir data wget https://paddlerec.bj.bcebos.com/word2vec/text.tar tar xvf text.tar mv text data/ \u6570\u636e\u9884\u5904\u7406 \u4ee5\u6837\u4f8b\u6570\u636e\u96c6\u4e3a\u4f8b\u8fdb\u884c\u9884\u5904\u7406\u3002\u5168\u91cf\u6570\u636e\u96c6\u6ce8\u610f\u89e3\u538b\u540e\u4ee5training-monolingual.tokenized.shuffled \u76ee\u5f55\u4e3a\u9884\u5904\u7406\u76ee\u5f55\uff0c\u548c\u6837\u4f8b\u6570\u636e\u96c6\u7684text\u76ee\u5f55\u5e76\u5217\u3002 \u8bcd\u5178\u683c\u5f0f: \u8bcd<\u7a7a\u683c>\u8bcd\u9891\u3002\u6ce8\u610f\u4f4e\u9891\u8bcd\u7528'UNK'\u8868\u793a \u53ef\u4ee5\u6309\u683c\u5f0f\u81ea\u5efa\u8bcd\u5178\uff0c\u5982\u679c\u81ea\u5efa\u8bcd\u5178\u8df3\u8fc7\u7b2c\u4e00\u6b65\u3002 the 1061396 of 593677 and 416629 one 411764 in 372201 a 325873 <UNK> 324608 to 316376 zero 264975 nine 250430 \u7b2c\u4e00\u6b65\u6839\u636e\u82f1\u6587\u8bed\u6599\u751f\u6210\u8bcd\u5178\uff0c\u4e2d\u6587\u8bed\u6599\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539text_strip\u65b9\u6cd5\u81ea\u5b9a\u4e49\u5904\u7406\u65b9\u6cd5\u3002 python preprocess.py --build_dict --build_dict_corpus_dir data/text/ --dict_path data/test_build_dict \u7b2c\u4e8c\u6b65\u6839\u636e\u8bcd\u5178\u5c06\u6587\u672c\u8f6c\u6210id, \u540c\u65f6\u8fdb\u884cdownsample\uff0c\u6309\u7167\u6982\u7387\u8fc7\u6ee4\u5e38\u89c1\u8bcd, \u540c\u65f6\u751f\u6210word\u548cid\u6620\u5c04\u7684\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u4e3a\u8bcd\u5178+\" word_to_id \"\u3002 python preprocess.py --filter_corpus --dict_path data/test_build_dict --input_corpus_dir data/text --output_corpus_dir data/convert_text8 --min_count 5 --downsample 0.001 \u8bad\u7ec3 \u5177\u4f53\u7684\u53c2\u6570\u914d\u7f6e\u53ef\u8fd0\u884c python train.py -h \u5355\u673a\u591a\u7ebf\u7a0b\u8bad\u7ec3 OPENBLAS_NUM_THREADS=1 CPU_NUM=5 python train.py --train_data_dir data/convert_text8 --dict_path data/test_build_dict --num_passes 10 --batch_size 100 --model_output_dir v1_cpu5_b100_lr1dir --base_lr 1.0 --print_batch 1000 --with_speed --is_sparse \u672c\u5730\u5355\u673a\u6a21\u62df\u591a\u673a\u8bad\u7ec3 sh cluster_train.sh \u672c\u793a\u4f8b\u4e2d\u6309\u7167\u5355\u673a\u591a\u7ebf\u7a0b\u8bad\u7ec3\u7684\u547d\u4ee4\u8fdb\u884c\u8bad\u7ec3\uff0c\u8bad\u7ec3\u5b8c\u6bd5\u540e\uff0c\u53ef\u770b\u5230\u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u4fdd\u5b58\u6a21\u578b\u7684\u8def\u5f84\u4e3a: v1_cpu5_b100_lr1dir , \u8fd0\u884c ls v1_cpu5_b100_lr1dir \u53ef\u770b\u5230\u8be5\u6587\u4ef6\u5939\u4e0b\u4fdd\u5b58\u4e86\u8bad\u7ec3\u768410\u4e2aepoch\u7684\u6a21\u578b\u6587\u4ef6\u3002 pass-0 pass-1 pass-2 pass-3 pass-4 pass-5 pass-6 pass-7 pass-8 pass-9 \u9884\u6d4b \u6d4b\u8bd5\u96c6\u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b #\u5168\u91cf\u6570\u636e\u96c6\u6d4b\u8bd5\u96c6 wget https://paddlerec.bj.bcebos.com/word2vec/test_dir.tar #\u6837\u672c\u6570\u636e\u96c6\u6d4b\u8bd5\u96c6 wget https://paddlerec.bj.bcebos.com/word2vec/test_mid_dir.tar \u9884\u6d4b\u547d\u4ee4\uff0c\u6ce8\u610f\u8bcd\u5178\u540d\u79f0\u9700\u8981\u52a0\u540e\u7f00\" word_to_id \", \u6b64\u6587\u4ef6\u662f\u9884\u5904\u7406\u9636\u6bb5\u751f\u6210\u7684\u3002 python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9 \u8fd0\u884c\u8be5\u9884\u6d4b\u547d\u4ee4, \u53ef\u770b\u5230\u5982\u4e0b\u8f93\u51fa ('start index: ', 0, ' last_index:', 9) ('vocab_size:', 63642) step:1 249 epoch:0 acc:0.014 step:1 590 epoch:1 acc:0.033 step:1 982 epoch:2 acc:0.055 step:1 1338 epoch:3 acc:0.075 step:1 1653 epoch:4 acc:0.093 step:1 1914 epoch:5 acc:0.107 step:1 2204 epoch:6 acc:0.124 step:1 2416 epoch:7 acc:0.136 step:1 2606 epoch:8 acc:0.146 step:1 2722 epoch:9 acc:0.153 \u91cf\u5316 \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u91cf\u5316\u914d\u7f6e\u4e3a: config = { 'params_name': 'emb', 'quantize_type': 'abs_max' } \u8fd0\u884c\u547d\u4ee4\u4e3a\uff1a python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9 --emb_quant True \u8fd0\u884c\u8f93\u51fa\u4e3a: ('start index: ', 0, ' last_index:', 9) ('vocab_size:', 63642) quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 253 epoch:0 acc:0.014 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 586 epoch:1 acc:0.033 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 970 epoch:2 acc:0.054 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1364 epoch:3 acc:0.077 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1642 epoch:4 acc:0.092 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1936 epoch:5 acc:0.109 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2216 epoch:6 acc:0.124 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2419 epoch:7 acc:0.136 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2603 epoch:8 acc:0.146 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2719 epoch:9 acc:0.153 \u91cf\u5316\u540e\u7684\u6a21\u578b\u4fdd\u5b58\u5728 ./output_quant \u4e2d\uff0c\u53ef\u770b\u5230\u91cf\u5316\u540e\u7684\u53c2\u6570 'emb.int8' \u7684\u5927\u5c0f\u4e3a3.9M, \u5728 ./v1_cpu5_b100_lr1dir \u4e2d\u53ef\u770b\u5230\u91cf\u5316\u524d\u7684\u53c2\u6570 'emb' \u7684\u5927\u5c0f\u4e3a16M\u3002","title":"Embedding\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_embedding_demo/#embedding","text":"\u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Embedding\u91cf\u5316\u7684\u63a5\u53e3 paddleslim.quant.quant_embedding \u3002 quant_embedding \u63a5\u53e3\u5c06\u7f51\u7edc\u4e2d\u7684Embedding\u53c2\u6570\u4ece float32 \u7c7b\u578b\u91cf\u5316\u5230 8-bit \u6574\u6570\u7c7b\u578b\uff0c\u5728\u51e0\u4e4e\u4e0d\u635f\u5931\u6a21\u578b\u7cbe\u5ea6\u7684\u60c5\u51b5\u4e0b\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002 \u63a5\u53e3\u4ecb\u7ecd\u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002 \u8be5\u63a5\u53e3\u5bf9program\u7684\u4fee\u6539\uff1a \u91cf\u5316\u524d: \u56fe1\uff1a\u91cf\u5316\u524d\u7684\u6a21\u578b\u7ed3\u6784 \u91cf\u5316\u540e\uff1a \u56fe2: \u91cf\u5316\u540e\u7684\u6a21\u578b\u7ed3\u6784 \u4ee5\u4e0b\u5c06\u4ee5 \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u4e3a\u4f8b\u6765\u8bf4\u660e\u5982\u4f55\u4f7f\u7528 quant_embedding \u63a5\u53e3\u3002\u9996\u5148\u4ecb\u7ecd \u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b \u7684\u6b63\u5e38\u8bad\u7ec3\u548c\u6d4b\u8bd5\u6d41\u7a0b\u3002","title":"Embedding\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_embedding_demo/#skip-gramword2vector","text":"\u4ee5\u4e0b\u662f\u672c\u4f8b\u7684\u7b80\u8981\u76ee\u5f55\u7ed3\u6784\u53ca\u8bf4\u660e\uff1a . \u251c\u2500\u2500 cluster_train.py # \u5206\u5e03\u5f0f\u8bad\u7ec3\u51fd\u6570 \u251c\u2500\u2500 cluster_train.sh # \u672c\u5730\u6a21\u62df\u591a\u673a\u811a\u672c \u251c\u2500\u2500 train.py # \u8bad\u7ec3\u51fd\u6570 \u251c\u2500\u2500 infer.py # \u9884\u6d4b\u811a\u672c \u251c\u2500\u2500 net.py # \u7f51\u7edc\u7ed3\u6784 \u251c\u2500\u2500 preprocess.py # \u9884\u5904\u7406\u811a\u672c\uff0c\u5305\u62ec\u6784\u5efa\u8bcd\u5178\u548c\u9884\u5904\u7406\u6587\u672c \u251c\u2500\u2500 reader.py # \u8bad\u7ec3\u9636\u6bb5\u7684\u6587\u672c\u8bfb\u5199 \u251c\u2500\u2500 train.py # \u8bad\u7ec3\u51fd\u6570 \u2514\u2500\u2500 utils.py # \u901a\u7528\u51fd\u6570","title":"\u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b"},{"location":"docs/tutorials/quant_embedding_demo/#_1","text":"\u672c\u4f8b\u5b9e\u73b0\u4e86skip-gram\u6a21\u5f0f\u7684word2vector\u6a21\u578b\u3002 \u540c\u65f6\u63a8\u8350\u7528\u6237\u53c2\u8003 IPython Notebook demo","title":"\u4ecb\u7ecd"},{"location":"docs/tutorials/quant_embedding_demo/#_2","text":"\u5168\u91cf\u6570\u636e\u96c6\u4f7f\u7528\u7684\u662f\u6765\u81ea1 Billion Word Language Model Benchmark\u7684(http://www.statmt.org/lm-benchmark) \u7684\u6570\u636e\u96c6. mkdir data wget http://www.statmt.org/lm-benchmark/1-billion-word-language-modeling-benchmark-r13output.tar.gz tar xzvf 1-billion-word-language-modeling-benchmark-r13output.tar.gz mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/ \u5907\u7528\u6570\u636e\u5730\u5740\u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b mkdir data wget https://paddlerec.bj.bcebos.com/word2vec/1-billion-word-language-modeling-benchmark-r13output.tar tar xvf 1-billion-word-language-modeling-benchmark-r13output.tar mv 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/ data/ \u4e3a\u4e86\u65b9\u4fbf\u5feb\u901f\u9a8c\u8bc1\uff0c\u6211\u4eec\u4e5f\u63d0\u4f9b\u4e86\u7ecf\u5178\u7684text8\u6837\u4f8b\u6570\u636e\u96c6\uff0c\u5305\u542b1700w\u4e2a\u8bcd\u3002 \u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b mkdir data wget https://paddlerec.bj.bcebos.com/word2vec/text.tar tar xvf text.tar mv text data/","title":"\u6570\u636e\u4e0b\u8f7d"},{"location":"docs/tutorials/quant_embedding_demo/#_3","text":"\u4ee5\u6837\u4f8b\u6570\u636e\u96c6\u4e3a\u4f8b\u8fdb\u884c\u9884\u5904\u7406\u3002\u5168\u91cf\u6570\u636e\u96c6\u6ce8\u610f\u89e3\u538b\u540e\u4ee5training-monolingual.tokenized.shuffled \u76ee\u5f55\u4e3a\u9884\u5904\u7406\u76ee\u5f55\uff0c\u548c\u6837\u4f8b\u6570\u636e\u96c6\u7684text\u76ee\u5f55\u5e76\u5217\u3002 \u8bcd\u5178\u683c\u5f0f: \u8bcd<\u7a7a\u683c>\u8bcd\u9891\u3002\u6ce8\u610f\u4f4e\u9891\u8bcd\u7528'UNK'\u8868\u793a \u53ef\u4ee5\u6309\u683c\u5f0f\u81ea\u5efa\u8bcd\u5178\uff0c\u5982\u679c\u81ea\u5efa\u8bcd\u5178\u8df3\u8fc7\u7b2c\u4e00\u6b65\u3002 the 1061396 of 593677 and 416629 one 411764 in 372201 a 325873 <UNK> 324608 to 316376 zero 264975 nine 250430 \u7b2c\u4e00\u6b65\u6839\u636e\u82f1\u6587\u8bed\u6599\u751f\u6210\u8bcd\u5178\uff0c\u4e2d\u6587\u8bed\u6599\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539text_strip\u65b9\u6cd5\u81ea\u5b9a\u4e49\u5904\u7406\u65b9\u6cd5\u3002 python preprocess.py --build_dict --build_dict_corpus_dir data/text/ --dict_path data/test_build_dict \u7b2c\u4e8c\u6b65\u6839\u636e\u8bcd\u5178\u5c06\u6587\u672c\u8f6c\u6210id, \u540c\u65f6\u8fdb\u884cdownsample\uff0c\u6309\u7167\u6982\u7387\u8fc7\u6ee4\u5e38\u89c1\u8bcd, \u540c\u65f6\u751f\u6210word\u548cid\u6620\u5c04\u7684\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u4e3a\u8bcd\u5178+\" word_to_id \"\u3002 python preprocess.py --filter_corpus --dict_path data/test_build_dict --input_corpus_dir data/text --output_corpus_dir data/convert_text8 --min_count 5 --downsample 0.001","title":"\u6570\u636e\u9884\u5904\u7406"},{"location":"docs/tutorials/quant_embedding_demo/#_4","text":"\u5177\u4f53\u7684\u53c2\u6570\u914d\u7f6e\u53ef\u8fd0\u884c python train.py -h \u5355\u673a\u591a\u7ebf\u7a0b\u8bad\u7ec3 OPENBLAS_NUM_THREADS=1 CPU_NUM=5 python train.py --train_data_dir data/convert_text8 --dict_path data/test_build_dict --num_passes 10 --batch_size 100 --model_output_dir v1_cpu5_b100_lr1dir --base_lr 1.0 --print_batch 1000 --with_speed --is_sparse \u672c\u5730\u5355\u673a\u6a21\u62df\u591a\u673a\u8bad\u7ec3 sh cluster_train.sh \u672c\u793a\u4f8b\u4e2d\u6309\u7167\u5355\u673a\u591a\u7ebf\u7a0b\u8bad\u7ec3\u7684\u547d\u4ee4\u8fdb\u884c\u8bad\u7ec3\uff0c\u8bad\u7ec3\u5b8c\u6bd5\u540e\uff0c\u53ef\u770b\u5230\u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u4fdd\u5b58\u6a21\u578b\u7684\u8def\u5f84\u4e3a: v1_cpu5_b100_lr1dir , \u8fd0\u884c ls v1_cpu5_b100_lr1dir \u53ef\u770b\u5230\u8be5\u6587\u4ef6\u5939\u4e0b\u4fdd\u5b58\u4e86\u8bad\u7ec3\u768410\u4e2aepoch\u7684\u6a21\u578b\u6587\u4ef6\u3002 pass-0 pass-1 pass-2 pass-3 pass-4 pass-5 pass-6 pass-7 pass-8 pass-9","title":"\u8bad\u7ec3"},{"location":"docs/tutorials/quant_embedding_demo/#_5","text":"\u6d4b\u8bd5\u96c6\u4e0b\u8f7d\u547d\u4ee4\u5982\u4e0b #\u5168\u91cf\u6570\u636e\u96c6\u6d4b\u8bd5\u96c6 wget https://paddlerec.bj.bcebos.com/word2vec/test_dir.tar #\u6837\u672c\u6570\u636e\u96c6\u6d4b\u8bd5\u96c6 wget https://paddlerec.bj.bcebos.com/word2vec/test_mid_dir.tar \u9884\u6d4b\u547d\u4ee4\uff0c\u6ce8\u610f\u8bcd\u5178\u540d\u79f0\u9700\u8981\u52a0\u540e\u7f00\" word_to_id \", \u6b64\u6587\u4ef6\u662f\u9884\u5904\u7406\u9636\u6bb5\u751f\u6210\u7684\u3002 python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9 \u8fd0\u884c\u8be5\u9884\u6d4b\u547d\u4ee4, \u53ef\u770b\u5230\u5982\u4e0b\u8f93\u51fa ('start index: ', 0, ' last_index:', 9) ('vocab_size:', 63642) step:1 249 epoch:0 acc:0.014 step:1 590 epoch:1 acc:0.033 step:1 982 epoch:2 acc:0.055 step:1 1338 epoch:3 acc:0.075 step:1 1653 epoch:4 acc:0.093 step:1 1914 epoch:5 acc:0.107 step:1 2204 epoch:6 acc:0.124 step:1 2416 epoch:7 acc:0.136 step:1 2606 epoch:8 acc:0.146 step:1 2722 epoch:9 acc:0.153","title":"\u9884\u6d4b"},{"location":"docs/tutorials/quant_embedding_demo/#skip-gramword2vector_1","text":"\u91cf\u5316\u914d\u7f6e\u4e3a: config = { 'params_name': 'emb', 'quantize_type': 'abs_max' } \u8fd0\u884c\u547d\u4ee4\u4e3a\uff1a python infer.py --infer_epoch --test_dir data/test_mid_dir --dict_path data/test_build_dict_word_to_id_ --batch_size 20000 --model_dir v1_cpu5_b100_lr1dir/ --start_index 0 --last_index 9 --emb_quant True \u8fd0\u884c\u8f93\u51fa\u4e3a: ('start index: ', 0, ' last_index:', 9) ('vocab_size:', 63642) quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 253 epoch:0 acc:0.014 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 586 epoch:1 acc:0.033 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 970 epoch:2 acc:0.054 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1364 epoch:3 acc:0.077 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1642 epoch:4 acc:0.092 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 1936 epoch:5 acc:0.109 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2216 epoch:6 acc:0.124 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2419 epoch:7 acc:0.136 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2603 epoch:8 acc:0.146 quant_embedding config {'quantize_type': 'abs_max', 'params_name': 'emb', 'quantize_bits': 8, 'dtype': 'int8'} step:1 2719 epoch:9 acc:0.153 \u91cf\u5316\u540e\u7684\u6a21\u578b\u4fdd\u5b58\u5728 ./output_quant \u4e2d\uff0c\u53ef\u770b\u5230\u91cf\u5316\u540e\u7684\u53c2\u6570 'emb.int8' \u7684\u5927\u5c0f\u4e3a3.9M, \u5728 ./v1_cpu5_b100_lr1dir \u4e2d\u53ef\u770b\u5230\u91cf\u5316\u524d\u7684\u53c2\u6570 'emb' \u7684\u5927\u5c0f\u4e3a16M\u3002","title":"\u91cf\u5316\u57fa\u4e8eskip-gram\u7684word2vector\u6a21\u578b"},{"location":"docs/tutorials/quant_post_demo/","text":"\u79bb\u7ebf\u91cf\u5316\u793a\u4f8b \u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3 paddleslim.quant.quant_post \u6765\u5bf9\u8bad\u7ec3\u597d\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316, \u8be5\u63a5\u53e3\u65e0\u9700\u5bf9\u6a21\u578b\u8fdb\u884c\u8bad\u7ec3\u5c31\u53ef\u5f97\u5230\u91cf\u5316\u6a21\u578b\uff0c\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002 \u63a5\u53e3\u4ecb\u7ecd \u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002 \u5206\u7c7b\u6a21\u578b\u7684\u79bb\u7ebf\u91cf\u5316\u6d41\u7a0b \u51c6\u5907\u6570\u636e \u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u521b\u5efa data \u6587\u4ef6\u5939\uff0c\u5c06 imagenet \u6570\u636e\u96c6\u89e3\u538b\u5728 data \u6587\u4ef6\u5939\u4e0b\uff0c\u89e3\u538b\u540e data \u6587\u4ef6\u5939\u4e0b\u5e94\u5305\u542b\u4ee5\u4e0b\u6587\u4ef6\uff1a - 'train' \u6587\u4ef6\u5939\uff0c\u8bad\u7ec3\u56fe\u7247 - 'train_list.txt' \u6587\u4ef6 - 'val' \u6587\u4ef6\u5939\uff0c\u9a8c\u8bc1\u56fe\u7247 - 'val_list.txt' \u6587\u4ef6 \u51c6\u5907\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b \u56e0\u4e3a\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3\u53ea\u652f\u6301\u52a0\u8f7d\u901a\u8fc7 fluid.io.save_inference_model \u63a5\u53e3\u4fdd\u5b58\u7684\u6a21\u578b\uff0c\u56e0\u6b64\u5982\u679c\u60a8\u7684\u6a21\u578b\u662f\u901a\u8fc7\u5176\u4ed6\u63a5\u53e3\u4fdd\u5b58\u7684\uff0c\u90a3\u9700\u8981\u5148\u5c06\u6a21\u578b\u8fdb\u884c\u8f6c\u5316\u3002\u672c\u793a\u4f8b\u5c06\u4ee5\u5206\u7c7b\u6a21\u578b\u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002 \u9996\u5148\u5728 imagenet\u5206\u7c7b\u6a21\u578b \u4e2d\u4e0b\u8f7d\u8bad\u7ec3\u597d\u7684 mobilenetv1 \u6a21\u578b\u3002 \u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u521b\u5efa 'pretrain' \u6587\u4ef6\u5939\uff0c\u5c06 mobilenetv1 \u6a21\u578b\u5728\u8be5\u6587\u4ef6\u5939\u4e0b\u89e3\u538b\uff0c\u89e3\u538b\u540e\u7684\u76ee\u5f55\u4e3a pretrain/MobileNetV1_pretrained \u5bfc\u51fa\u6a21\u578b \u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u53ef\u5c06\u6a21\u578b\u8f6c\u5316\u4e3a\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3\u53ef\u7528\u7684\u6a21\u578b\uff1a python export_model.py --model \"MobileNet\" --pretrained_model ./pretrain/MobileNetV1_pretrained --data imagenet \u8f6c\u5316\u4e4b\u540e\u7684\u6a21\u578b\u5b58\u50a8\u5728 inference_model/MobileNet/ \u6587\u4ef6\u5939\u4e0b\uff0c\u53ef\u770b\u5230\u8be5\u6587\u4ef6\u5939\u4e0b\u6709 'model' , 'weights' \u4e24\u4e2a\u6587\u4ef6\u3002 \u79bb\u7ebf\u91cf\u5316 \u63a5\u4e0b\u6765\u5bf9\u5bfc\u51fa\u7684\u6a21\u578b\u6587\u4ef6\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\uff0c\u79bb\u7ebf\u91cf\u5316\u7684\u811a\u672c\u4e3a quant_post.py \uff0c\u811a\u672c\u4e2d\u4f7f\u7528\u63a5\u53e3 paddleslim.quant.quant_post \u5bf9\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\u3002\u8fd0\u884c\u547d\u4ee4\u4e3a\uff1a python quant_post.py --model_path ./inference_model/MobileNet --save_path ./quant_model_train/MobileNet --model_filename model --params_filename weights model_path : \u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u5750\u5728\u7684\u6587\u4ef6\u5939 save_path : \u91cf\u5316\u540e\u7684\u6a21\u578b\u4fdd\u5b58\u7684\u8def\u5f84 model_filename : \u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u8bbe\u7f6e\u4e3a\u8be5\u6a21\u578b\u7684\u6a21\u578b\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u679c\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u591a\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u4e0d\u9700\u8981\u8bbe\u7f6e\u3002 params_filename : \u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u8bbe\u7f6e\u4e3a\u8be5\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u679c\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u591a\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u4e0d\u9700\u8981\u8bbe\u7f6e\u3002 \u8fd0\u884c\u4ee5\u4e0a\u547d\u4ee4\u540e\uff0c\u53ef\u5728 ${save_path} \u4e0b\u770b\u5230\u91cf\u5316\u540e\u7684\u6a21\u578b\u6587\u4ef6\u548c\u53c2\u6570\u6587\u4ef6\u3002 \u4f7f\u7528\u7684\u91cf\u5316\u7b97\u6cd5\u4e3a 'KL' , \u4f7f\u7528\u8bad\u7ec3\u96c6\u4e2d\u7684160\u5f20\u56fe\u7247\u8fdb\u884c\u91cf\u5316\u53c2\u6570\u7684\u6821\u6b63\u3002 \u6d4b\u8bd5\u7cbe\u5ea6 \u4f7f\u7528 eval.py \u811a\u672c\u5bf9\u91cf\u5316\u524d\u540e\u7684\u6a21\u578b\u8fdb\u884c\u6d4b\u8bd5\uff0c\u5f97\u5230\u6a21\u578b\u7684\u5206\u7c7b\u7cbe\u5ea6\u8fdb\u884c\u5bf9\u6bd4\u3002 \u9996\u5148\u6d4b\u8bd5\u91cf\u5316\u524d\u7684\u6a21\u578b\u7684\u7cbe\u5ea6\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a python eval.py --model_path ./inference_model/MobileNet --model_name model --params_name weights \u7cbe\u5ea6\u8f93\u51fa\u4e3a: top1_acc/top5_acc= [0.70913923 0.89548034] \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6d4b\u8bd5\u79bb\u7ebf\u91cf\u5316\u540e\u7684\u6a21\u578b\u7684\u7cbe\u5ea6\uff1a python eval.py --model_path ./quant_model_train/MobileNet \u7cbe\u5ea6\u8f93\u51fa\u4e3a top1_acc/top5_acc= [0.70141864 0.89086477] \u4ece\u4ee5\u4e0a\u7cbe\u5ea6\u5bf9\u6bd4\u53ef\u4ee5\u770b\u51fa\uff0c\u5bf9 mobilenet \u5728 imagenet \u4e0a\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\u540e top1 \u7cbe\u5ea6\u635f\u5931\u4e3a 0.77% \uff0c top5 \u7cbe\u5ea6\u635f\u5931\u4e3a 0.46% .","title":"\u79bb\u7ebf\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_post_demo/#_1","text":"\u672c\u793a\u4f8b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3 paddleslim.quant.quant_post \u6765\u5bf9\u8bad\u7ec3\u597d\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316, \u8be5\u63a5\u53e3\u65e0\u9700\u5bf9\u6a21\u578b\u8fdb\u884c\u8bad\u7ec3\u5c31\u53ef\u5f97\u5230\u91cf\u5316\u6a21\u578b\uff0c\u51cf\u5c11\u6a21\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u548c\u663e\u5b58\u5360\u7528\u3002","title":"\u79bb\u7ebf\u91cf\u5316\u793a\u4f8b"},{"location":"docs/tutorials/quant_post_demo/#_2","text":"\u8bf7\u53c2\u8003 \u91cf\u5316API\u6587\u6863 \u3002","title":"\u63a5\u53e3\u4ecb\u7ecd"},{"location":"docs/tutorials/quant_post_demo/#_3","text":"","title":"\u5206\u7c7b\u6a21\u578b\u7684\u79bb\u7ebf\u91cf\u5316\u6d41\u7a0b"},{"location":"docs/tutorials/quant_post_demo/#_4","text":"\u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u521b\u5efa data \u6587\u4ef6\u5939\uff0c\u5c06 imagenet \u6570\u636e\u96c6\u89e3\u538b\u5728 data \u6587\u4ef6\u5939\u4e0b\uff0c\u89e3\u538b\u540e data \u6587\u4ef6\u5939\u4e0b\u5e94\u5305\u542b\u4ee5\u4e0b\u6587\u4ef6\uff1a - 'train' \u6587\u4ef6\u5939\uff0c\u8bad\u7ec3\u56fe\u7247 - 'train_list.txt' \u6587\u4ef6 - 'val' \u6587\u4ef6\u5939\uff0c\u9a8c\u8bc1\u56fe\u7247 - 'val_list.txt' \u6587\u4ef6","title":"\u51c6\u5907\u6570\u636e"},{"location":"docs/tutorials/quant_post_demo/#_5","text":"\u56e0\u4e3a\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3\u53ea\u652f\u6301\u52a0\u8f7d\u901a\u8fc7 fluid.io.save_inference_model \u63a5\u53e3\u4fdd\u5b58\u7684\u6a21\u578b\uff0c\u56e0\u6b64\u5982\u679c\u60a8\u7684\u6a21\u578b\u662f\u901a\u8fc7\u5176\u4ed6\u63a5\u53e3\u4fdd\u5b58\u7684\uff0c\u90a3\u9700\u8981\u5148\u5c06\u6a21\u578b\u8fdb\u884c\u8f6c\u5316\u3002\u672c\u793a\u4f8b\u5c06\u4ee5\u5206\u7c7b\u6a21\u578b\u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002 \u9996\u5148\u5728 imagenet\u5206\u7c7b\u6a21\u578b \u4e2d\u4e0b\u8f7d\u8bad\u7ec3\u597d\u7684 mobilenetv1 \u6a21\u578b\u3002 \u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u521b\u5efa 'pretrain' \u6587\u4ef6\u5939\uff0c\u5c06 mobilenetv1 \u6a21\u578b\u5728\u8be5\u6587\u4ef6\u5939\u4e0b\u89e3\u538b\uff0c\u89e3\u538b\u540e\u7684\u76ee\u5f55\u4e3a pretrain/MobileNetV1_pretrained","title":"\u51c6\u5907\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b"},{"location":"docs/tutorials/quant_post_demo/#_6","text":"\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u53ef\u5c06\u6a21\u578b\u8f6c\u5316\u4e3a\u79bb\u7ebf\u91cf\u5316\u63a5\u53e3\u53ef\u7528\u7684\u6a21\u578b\uff1a python export_model.py --model \"MobileNet\" --pretrained_model ./pretrain/MobileNetV1_pretrained --data imagenet \u8f6c\u5316\u4e4b\u540e\u7684\u6a21\u578b\u5b58\u50a8\u5728 inference_model/MobileNet/ \u6587\u4ef6\u5939\u4e0b\uff0c\u53ef\u770b\u5230\u8be5\u6587\u4ef6\u5939\u4e0b\u6709 'model' , 'weights' \u4e24\u4e2a\u6587\u4ef6\u3002","title":"\u5bfc\u51fa\u6a21\u578b"},{"location":"docs/tutorials/quant_post_demo/#_7","text":"\u63a5\u4e0b\u6765\u5bf9\u5bfc\u51fa\u7684\u6a21\u578b\u6587\u4ef6\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\uff0c\u79bb\u7ebf\u91cf\u5316\u7684\u811a\u672c\u4e3a quant_post.py \uff0c\u811a\u672c\u4e2d\u4f7f\u7528\u63a5\u53e3 paddleslim.quant.quant_post \u5bf9\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\u3002\u8fd0\u884c\u547d\u4ee4\u4e3a\uff1a python quant_post.py --model_path ./inference_model/MobileNet --save_path ./quant_model_train/MobileNet --model_filename model --params_filename weights model_path : \u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u5750\u5728\u7684\u6587\u4ef6\u5939 save_path : \u91cf\u5316\u540e\u7684\u6a21\u578b\u4fdd\u5b58\u7684\u8def\u5f84 model_filename : \u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u8bbe\u7f6e\u4e3a\u8be5\u6a21\u578b\u7684\u6a21\u578b\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u679c\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u591a\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u4e0d\u9700\u8981\u8bbe\u7f6e\u3002 params_filename : \u5982\u679c\u9700\u8981\u91cf\u5316\u7684\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u8bbe\u7f6e\u4e3a\u8be5\u6a21\u578b\u7684\u53c2\u6570\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u679c\u53c2\u6570\u6587\u4ef6\u4fdd\u5b58\u5728\u591a\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u4e0d\u9700\u8981\u8bbe\u7f6e\u3002 \u8fd0\u884c\u4ee5\u4e0a\u547d\u4ee4\u540e\uff0c\u53ef\u5728 ${save_path} \u4e0b\u770b\u5230\u91cf\u5316\u540e\u7684\u6a21\u578b\u6587\u4ef6\u548c\u53c2\u6570\u6587\u4ef6\u3002 \u4f7f\u7528\u7684\u91cf\u5316\u7b97\u6cd5\u4e3a 'KL' , \u4f7f\u7528\u8bad\u7ec3\u96c6\u4e2d\u7684160\u5f20\u56fe\u7247\u8fdb\u884c\u91cf\u5316\u53c2\u6570\u7684\u6821\u6b63\u3002","title":"\u79bb\u7ebf\u91cf\u5316"},{"location":"docs/tutorials/quant_post_demo/#_8","text":"\u4f7f\u7528 eval.py \u811a\u672c\u5bf9\u91cf\u5316\u524d\u540e\u7684\u6a21\u578b\u8fdb\u884c\u6d4b\u8bd5\uff0c\u5f97\u5230\u6a21\u578b\u7684\u5206\u7c7b\u7cbe\u5ea6\u8fdb\u884c\u5bf9\u6bd4\u3002 \u9996\u5148\u6d4b\u8bd5\u91cf\u5316\u524d\u7684\u6a21\u578b\u7684\u7cbe\u5ea6\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a python eval.py --model_path ./inference_model/MobileNet --model_name model --params_name weights \u7cbe\u5ea6\u8f93\u51fa\u4e3a: top1_acc/top5_acc= [0.70913923 0.89548034] \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6d4b\u8bd5\u79bb\u7ebf\u91cf\u5316\u540e\u7684\u6a21\u578b\u7684\u7cbe\u5ea6\uff1a python eval.py --model_path ./quant_model_train/MobileNet \u7cbe\u5ea6\u8f93\u51fa\u4e3a top1_acc/top5_acc= [0.70141864 0.89086477] \u4ece\u4ee5\u4e0a\u7cbe\u5ea6\u5bf9\u6bd4\u53ef\u4ee5\u770b\u51fa\uff0c\u5bf9 mobilenet \u5728 imagenet \u4e0a\u7684\u5206\u7c7b\u6a21\u578b\u8fdb\u884c\u79bb\u7ebf\u91cf\u5316\u540e top1 \u7cbe\u5ea6\u635f\u5931\u4e3a 0.77% \uff0c top5 \u7cbe\u5ea6\u635f\u5931\u4e3a 0.46% .","title":"\u6d4b\u8bd5\u7cbe\u5ea6"}]}
\ No newline at end of file
var base_path = 'function' === typeof importScripts ? '.' : '/search/';
var allowSearch = false;
var index;
var documents = {};
var lang = ['en'];
var data;
function getScript(script, callback) {
console.log('Loading script: ' + script);
$.getScript(base_path + script).done(function () {
callback();
}).fail(function (jqxhr, settings, exception) {
console.log('Error: ' + exception);
});
}
function getScriptsInOrder(scripts, callback) {
if (scripts.length === 0) {
callback();
return;
}
getScript(scripts[0], function() {
getScriptsInOrder(scripts.slice(1), callback);
});
}
function loadScripts(urls, callback) {
if( 'function' === typeof importScripts ) {
importScripts.apply(null, urls);
callback();
} else {
getScriptsInOrder(urls, callback);
}
}
function onJSONLoaded () {
data = JSON.parse(this.responseText);
var scriptsToLoad = ['lunr.js'];
if (data.config && data.config.lang && data.config.lang.length) {
lang = data.config.lang;
}
if (lang.length > 1 || lang[0] !== "en") {
scriptsToLoad.push('lunr.stemmer.support.js');
if (lang.length > 1) {
scriptsToLoad.push('lunr.multi.js');
}
for (var i=0; i < lang.length; i++) {
if (lang[i] != 'en') {
scriptsToLoad.push(['lunr', lang[i], 'js'].join('.'));
}
}
}
loadScripts(scriptsToLoad, onScriptsLoaded);
}
function onScriptsLoaded () {
console.log('All search scripts loaded, building Lunr index...');
if (data.config && data.config.separator && data.config.separator.length) {
lunr.tokenizer.separator = new RegExp(data.config.separator);
}
if (data.index) {
index = lunr.Index.load(data.index);
data.docs.forEach(function (doc) {
documents[doc.location] = doc;
});
console.log('Lunr pre-built index loaded, search ready');
} else {
index = lunr(function () {
if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) {
this.use(lunr[lang[0]]);
} else if (lang.length > 1) {
this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility
}
this.field('title');
this.field('text');
this.ref('location');
for (var i=0; i < data.docs.length; i++) {
var doc = data.docs[i];
this.add(doc);
documents[doc.location] = doc;
}
});
console.log('Lunr index built, search ready');
}
allowSearch = true;
postMessage({allowSearch: allowSearch});
}
function init () {
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", onJSONLoaded);
var index_path = base_path + '/search_index.json';
if( 'function' === typeof importScripts ){
index_path = 'search_index.json';
}
oReq.open("GET", index_path);
oReq.send();
}
function search (query) {
if (!allowSearch) {
console.error('Assets for search still loading');
return;
}
var resultDocuments = [];
var results = index.search(query);
for (var i=0; i < results.length; i++){
var result = results[i];
doc = documents[result.ref];
doc.summary = doc.text.substring(0, 200);
resultDocuments.push(doc);
}
return resultDocuments;
}
if( 'function' === typeof importScripts ) {
onmessage = function (e) {
if (e.data.init) {
init();
} else if (e.data.query) {
postMessage({ results: search(e.data.query) });
} else {
console.error("Worker - Unrecognized message: " + e);
}
};
}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-12-19</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
\ No newline at end of file
文件已添加
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册