blob: 20358e54df6aff9da16e23684521ca0d58f943aa [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>mxnet: include/mxnet/c_predict_api.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">mxnet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1143c7affb9ebd026cb6818dd282def7.html">mxnet</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">c_predict_api.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>C predict API of mxnet, contains a minimum API to run prediction. This file is self-contained, and do not dependent on any other files.
<a href="#details">More...</a></p>
<p><a href="c__predict__api_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a5b0e47dde55f9b2f58b99fab92d1e0ac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a></td></tr>
<tr class="memdesc:a5b0e47dde55f9b2f58b99fab92d1e0ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inhibit C++ name-mangling for MXNet functions. <a href="#a5b0e47dde55f9b2f58b99fab92d1e0ac">More...</a><br/></td></tr>
<tr class="separator:a5b0e47dde55f9b2f58b99fab92d1e0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a796e7ef8260ef40b24af7d1082aa2d84"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a></td></tr>
<tr class="memdesc:a796e7ef8260ef40b24af7d1082aa2d84"><td class="mdescLeft">&#160;</td><td class="mdescRight">manually define unsigned int <a href="#a796e7ef8260ef40b24af7d1082aa2d84">More...</a><br/></td></tr>
<tr class="separator:a796e7ef8260ef40b24af7d1082aa2d84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e709067707d9f90c534bd65494ae668"><td class="memItemLeft" align="right" valign="top">typedef float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a></td></tr>
<tr class="memdesc:a4e709067707d9f90c534bd65494ae668"><td class="mdescLeft">&#160;</td><td class="mdescRight">manually define float <a href="#a4e709067707d9f90c534bd65494ae668">More...</a><br/></td></tr>
<tr class="separator:a4e709067707d9f90c534bd65494ae668"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aacfd245edcae2dcd19e01192fcd7a2"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a></td></tr>
<tr class="memdesc:a0aacfd245edcae2dcd19e01192fcd7a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">handle to Predictor <a href="#a0aacfd245edcae2dcd19e01192fcd7a2">More...</a><br/></td></tr>
<tr class="separator:a0aacfd245edcae2dcd19e01192fcd7a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3058aee7831edae29e9ac39556e5fe5c"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a></td></tr>
<tr class="memdesc:a3058aee7831edae29e9ac39556e5fe5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">handle to NDArray list <a href="#a3058aee7831edae29e9ac39556e5fe5c">More...</a><br/></td></tr>
<tr class="separator:a3058aee7831edae29e9ac39556e5fe5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acab1874f3e3077710b77d1a005abf36c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#acab1874f3e3077710b77d1a005abf36c">MXGetLastError</a> ()</td></tr>
<tr class="memdesc:acab1874f3e3077710b77d1a005abf36c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the last error happeneed. <a href="#acab1874f3e3077710b77d1a005abf36c">More...</a><br/></td></tr>
<tr class="separator:acab1874f3e3077710b77d1a005abf36c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ce2bd607a3690b34f45491b040efb02"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a2ce2bd607a3690b34f45491b040efb02">MXPredCreate</a> (const char *symbol_json_str, const void *param_bytes, int param_size, int dev_type, int dev_id, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> num_input_nodes, const char **input_keys, const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *input_shape_indptr, const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *input_shape_data, <a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> *out)</td></tr>
<tr class="memdesc:a2ce2bd607a3690b34f45491b040efb02"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a predictor <a href="#a2ce2bd607a3690b34f45491b040efb02">More...</a><br/></td></tr>
<tr class="separator:a2ce2bd607a3690b34f45491b040efb02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac61691812a6e910ab671d83a759b4209"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#ac61691812a6e910ab671d83a759b4209">MXPredCreatePartialOut</a> (const char *symbol_json_str, const void *param_bytes, int param_size, int dev_type, int dev_id, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> num_input_nodes, const char **input_keys, const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *input_shape_indptr, const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *input_shape_data, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> num_output_nodes, const char **output_keys, <a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> *out)</td></tr>
<tr class="memdesc:ac61691812a6e910ab671d83a759b4209"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a predictor wich customized outputs <a href="#ac61691812a6e910ab671d83a759b4209">More...</a><br/></td></tr>
<tr class="separator:ac61691812a6e910ab671d83a759b4209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67200d0aeece20f690eb9b0e72cb2c9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a67200d0aeece20f690eb9b0e72cb2c9b">MXPredGetOutputShape</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> index, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> **shape_data, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *shape_ndim)</td></tr>
<tr class="memdesc:a67200d0aeece20f690eb9b0e72cb2c9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the shape of output node. The returned shape_data and shape_ndim is only valid before next call to MXPred function. <a href="#a67200d0aeece20f690eb9b0e72cb2c9b">More...</a><br/></td></tr>
<tr class="separator:a67200d0aeece20f690eb9b0e72cb2c9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68288592fa108c032b7ffee245984f83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a68288592fa108c032b7ffee245984f83">MXPredSetInput</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle, const char *key, const <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> *data, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> size)</td></tr>
<tr class="memdesc:a68288592fa108c032b7ffee245984f83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the input data of predictor. <a href="#a68288592fa108c032b7ffee245984f83">More...</a><br/></td></tr>
<tr class="separator:a68288592fa108c032b7ffee245984f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ce8a6c852f1ae11c2504b9bc186e723"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a1ce8a6c852f1ae11c2504b9bc186e723">MXPredForward</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle)</td></tr>
<tr class="memdesc:a1ce8a6c852f1ae11c2504b9bc186e723"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a forward pass to get the output. <a href="#a1ce8a6c852f1ae11c2504b9bc186e723">More...</a><br/></td></tr>
<tr class="separator:a1ce8a6c852f1ae11c2504b9bc186e723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4ac0ebf9f6494c383d3fe3b72ae2f52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#aa4ac0ebf9f6494c383d3fe3b72ae2f52">MXPredPartialForward</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle, int step, int *step_left)</td></tr>
<tr class="memdesc:aa4ac0ebf9f6494c383d3fe3b72ae2f52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a interactive forward pass to get the output. This is helpful for displaying progress of prediction which can be slow. User must call PartialForward from step=0, keep increasing it until step_left=0. <a href="#aa4ac0ebf9f6494c383d3fe3b72ae2f52">More...</a><br/></td></tr>
<tr class="separator:aa4ac0ebf9f6494c383d3fe3b72ae2f52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaadef67a6a9a2308f2d8160f91724af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#aeaadef67a6a9a2308f2d8160f91724af">MXPredGetOutput</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> index, <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> *data, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> size)</td></tr>
<tr class="memdesc:aeaadef67a6a9a2308f2d8160f91724af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the output value of prediction. <a href="#aeaadef67a6a9a2308f2d8160f91724af">More...</a><br/></td></tr>
<tr class="separator:aeaadef67a6a9a2308f2d8160f91724af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af21704e92e5b519bdcfef5fcb504195b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#af21704e92e5b519bdcfef5fcb504195b">MXPredFree</a> (<a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> handle)</td></tr>
<tr class="memdesc:af21704e92e5b519bdcfef5fcb504195b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a predictor handle. <a href="#af21704e92e5b519bdcfef5fcb504195b">More...</a><br/></td></tr>
<tr class="separator:af21704e92e5b519bdcfef5fcb504195b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ffd608b7df02883a54dbbfaa20dcb3e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a1ffd608b7df02883a54dbbfaa20dcb3e">MXNDListCreate</a> (const char *nd_file_bytes, int nd_file_size, <a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a> *out, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *out_length)</td></tr>
<tr class="memdesc:a1ffd608b7df02883a54dbbfaa20dcb3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a NDArray List by loading from ndarray file. This can be used to load mean image file. <a href="#a1ffd608b7df02883a54dbbfaa20dcb3e">More...</a><br/></td></tr>
<tr class="separator:a1ffd608b7df02883a54dbbfaa20dcb3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fa7cfab6362f3f66c1ca44a8b809674"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#a0fa7cfab6362f3f66c1ca44a8b809674">MXNDListGet</a> (<a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a> handle, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> index, const char **out_key, const <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> **out_data, const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> **out_shape, <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *out_ndim)</td></tr>
<tr class="memdesc:a0fa7cfab6362f3f66c1ca44a8b809674"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an element from list. <a href="#a0fa7cfab6362f3f66c1ca44a8b809674">More...</a><br/></td></tr>
<tr class="separator:a0fa7cfab6362f3f66c1ca44a8b809674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7db1b8ab8c7f3aab5b06f5c1f75ac62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__predict__api_8h.html#af7db1b8ab8c7f3aab5b06f5c1f75ac62">MXNDListFree</a> (<a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a> handle)</td></tr>
<tr class="memdesc:af7db1b8ab8c7f3aab5b06f5c1f75ac62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a MXAPINDList. <a href="#af7db1b8ab8c7f3aab5b06f5c1f75ac62">More...</a><br/></td></tr>
<tr class="separator:af7db1b8ab8c7f3aab5b06f5c1f75ac62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>C predict API of mxnet, contains a minimum API to run prediction. This file is self-contained, and do not dependent on any other files. </p>
<p>Copyright (c) 2015 by Contributors </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a5b0e47dde55f9b2f58b99fab92d1e0ac"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DLL</td>
</tr>
</table>
</div><div class="memdoc">
<p>Inhibit C++ name-mangling for MXNet functions. </p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a4e709067707d9f90c534bd65494ae668"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef float <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>manually define float </p>
</div>
</div>
<a class="anchor" id="a796e7ef8260ef40b24af7d1082aa2d84"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef unsigned int <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>manually define unsigned int </p>
</div>
</div>
<a class="anchor" id="a3058aee7831edae29e9ac39556e5fe5c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void* <a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>handle to NDArray list </p>
</div>
</div>
<a class="anchor" id="a0aacfd245edcae2dcd19e01192fcd7a2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void* <a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>handle to Predictor </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="acab1874f3e3077710b77d1a005abf36c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> const char* MXGetLastError </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the last error happeneed. </p>
<dl class="section return"><dt>Returns</dt><dd>The last error happened at the predictor. </dd></dl>
</div>
</div>
<a class="anchor" id="a1ffd608b7df02883a54dbbfaa20dcb3e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXNDListCreate </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>nd_file_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>nd_file_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a> *&#160;</td>
<td class="paramname"><em>out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>out_length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a NDArray List by loading from ndarray file. This can be used to load mean image file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">nd_file_bytes</td><td>The byte contents of nd file to be loaded. </td></tr>
<tr><td class="paramname">nd_file_size</td><td>The size of the nd file to be loaded. </td></tr>
<tr><td class="paramname">out</td><td>The out put NDListHandle </td></tr>
<tr><td class="paramname">out_length</td><td>Length of the list. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="af7db1b8ab8c7f3aab5b06f5c1f75ac62"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXNDListFree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a>&#160;</td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free a MXAPINDList. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the MXAPINDList. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a0fa7cfab6362f3f66c1ca44a8b809674"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXNDListGet </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a3058aee7831edae29e9ac39556e5fe5c">NDListHandle</a>&#160;</td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>out_key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> **&#160;</td>
<td class="paramname"><em>out_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> **&#160;</td>
<td class="paramname"><em>out_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>out_ndim</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get an element from list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle to the NDArray </td></tr>
<tr><td class="paramname">index</td><td>The index in the list </td></tr>
<tr><td class="paramname">out_key</td><td>The output key of the item </td></tr>
<tr><td class="paramname">out_data</td><td>The data region of the item </td></tr>
<tr><td class="paramname">out_shape</td><td>The shape of the item. </td></tr>
<tr><td class="paramname">out_ndim</td><td>The number of dimension in the shape. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a2ce2bd607a3690b34f45491b040efb02"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredCreate </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>symbol_json_str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>param_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>param_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dev_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dev_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>num_input_nodes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>input_keys</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>input_shape_indptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>input_shape_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> *&#160;</td>
<td class="paramname"><em>out</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>create a predictor </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol_json_str</td><td>The JSON string of the symbol. </td></tr>
<tr><td class="paramname">param_bytes</td><td>The in-memory raw bytes of parameter ndarray file. </td></tr>
<tr><td class="paramname">param_size</td><td>The size of parameter ndarray file. </td></tr>
<tr><td class="paramname">dev_type</td><td>The device type, 1: cpu, 2:gpu </td></tr>
<tr><td class="paramname">dev_id</td><td>The device id of the predictor. </td></tr>
<tr><td class="paramname">num_input_nodes</td><td>Number of input nodes to the net, For feedforward net, this is 1. </td></tr>
<tr><td class="paramname">input_keys</td><td>The name of input argument. For feedforward net, this is {"data"} </td></tr>
<tr><td class="paramname">input_shape_indptr</td><td>Index pointer of shapes of each input node. The length of this array = num_input_nodes + 1. For feedforward net that takes 4 dimensional input, this is {0, 4}. </td></tr>
<tr><td class="paramname">input_shape_data</td><td>A flatted data of shapes of each input node. For feedforward net that takes 4 dimensional input, this is the shape data. </td></tr>
<tr><td class="paramname">out</td><td>The created predictor handle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="ac61691812a6e910ab671d83a759b4209"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredCreatePartialOut </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>symbol_json_str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>param_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>param_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dev_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dev_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>num_input_nodes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>input_keys</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>input_shape_indptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>input_shape_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>num_output_nodes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>output_keys</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a> *&#160;</td>
<td class="paramname"><em>out</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>create a predictor wich customized outputs </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol_json_str</td><td>The JSON string of the symbol. </td></tr>
<tr><td class="paramname">param_bytes</td><td>The in-memory raw bytes of parameter ndarray file. </td></tr>
<tr><td class="paramname">param_size</td><td>The size of parameter ndarray file. </td></tr>
<tr><td class="paramname">dev_type</td><td>The device type, 1: cpu, 2:gpu </td></tr>
<tr><td class="paramname">dev_id</td><td>The device id of the predictor. </td></tr>
<tr><td class="paramname">num_input_nodes</td><td>Number of input nodes to the net, For feedforward net, this is 1. </td></tr>
<tr><td class="paramname">input_keys</td><td>The name of input argument. For feedforward net, this is {"data"} </td></tr>
<tr><td class="paramname">input_shape_indptr</td><td>Index pointer of shapes of each input node. The length of this array = num_input_nodes + 1. For feedforward net that takes 4 dimensional input, this is {0, 4}. </td></tr>
<tr><td class="paramname">input_shape_data</td><td>A flatted data of shapes of each input node. For feedforward net that takes 4 dimensional input, this is the shape data. </td></tr>
<tr><td class="paramname">num_output_nodes</td><td>Number of output nodes to the net, </td></tr>
<tr><td class="paramname">output_keys</td><td>The name of output argument. For example {"global_pool"} </td></tr>
<tr><td class="paramname">out</td><td>The created predictor handle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a1ce8a6c852f1ae11c2504b9bc186e723"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredForward </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Run a forward pass to get the output. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the predictor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="af21704e92e5b519bdcfef5fcb504195b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredFree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free a predictor handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the predictor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="aeaadef67a6a9a2308f2d8160f91724af"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredGetOutput </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the output value of prediction. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the predictor. </td></tr>
<tr><td class="paramname">index</td><td>The index of output node, set to 0 if there is only one output. </td></tr>
<tr><td class="paramname">data</td><td>User allocated data to hold the output. </td></tr>
<tr><td class="paramname">size</td><td>The size of data array, used for safe checking. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a67200d0aeece20f690eb9b0e72cb2c9b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredGetOutputShape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> **&#160;</td>
<td class="paramname"><em>shape_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a> *&#160;</td>
<td class="paramname"><em>shape_ndim</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the shape of output node. The returned shape_data and shape_ndim is only valid before next call to MXPred function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the predictor. </td></tr>
<tr><td class="paramname">index</td><td>The index of output node, set to 0 if there is only one output. </td></tr>
<tr><td class="paramname">shape_data</td><td>Used to hold pointer to the shape data </td></tr>
<tr><td class="paramname">shape_ndim</td><td>Used to hold shape dimension. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="aa4ac0ebf9f6494c383d3fe3b72ae2f52"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredPartialForward </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>step</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>step_left</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Run a interactive forward pass to get the output. This is helpful for displaying progress of prediction which can be slow. User must call PartialForward from step=0, keep increasing it until step_left=0. </p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> step_left = 1;</div>
<div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">int</span> step = 0; step_left != 0; ++step) {</div>
<div class="line"> <a class="code" href="c__predict__api_8h.html#aa4ac0ebf9f6494c383d3fe3b72ae2f52">MXPredPartialForward</a>(handle, step, &amp;step_left);</div>
<div class="line"> printf(<span class="stringliteral">&quot;Current progress [%d/%d]\n&quot;</span>, step, step + step_left + 1);</div>
<div class="line">}</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The handle of the predictor. </td></tr>
<tr><td class="paramname">step</td><td>The current step to run forward on. </td></tr>
<tr><td class="paramname">step_left</td><td>The number of steps left </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a68288592fa108c032b7ffee245984f83"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXPredSetInput </td>
<td>(</td>
<td class="paramtype"><a class="el" href="c__predict__api_8h.html#a0aacfd245edcae2dcd19e01192fcd7a2">PredictorHandle</a>&#160;</td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="c__api_8h.html#a4e709067707d9f90c534bd65494ae668">mx_float</a> *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="c__api_8h.html#a796e7ef8260ef40b24af7d1082aa2d84">mx_uint</a>&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the input data of predictor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>The predictor handle. </td></tr>
<tr><td class="paramname">key</td><td>The name of input node to set. For feedforward net, this is "data". </td></tr>
<tr><td class="paramname">data</td><td>The pointer to the data to be set, with the shape specified in MXPredCreate. </td></tr>
<tr><td class="paramname">size</td><td>The size of data array, used for safety check. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 when success, -1 when failure. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 6 2017 07:14:31 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>