self._get_output = module["get_output"]
self._get_input = module["get_input"]
self._get_num_outputs = module["get_num_outputs"]
+ self._get_num_inputs = module["get_num_inputs"]
self._load_params = module["load_params"]
self._share_params = module["share_params"]
"""
return self._get_num_outputs()
+ def get_num_inputs(self):
+ """Get the number of inputs to the graph
+
+ Returns
+ -------
+ count : int
+ The number of inputs.
+ """
+ return self._get_num_inputs()
+
def get_input(self, index, out=None):
"""Get index-th input to out
*/
int GraphRuntime::NumOutputs() const { return outputs_.size(); }
/*!
+ * \brief Get the number of inputs
+ *
+ * \return The number of inputs to the graph.
+ */
+int GraphRuntime::NumInputs() const { return input_nodes_.size(); }
+/*!
* \brief Return NDArray for given input index.
* \param index The input index.
*
} else if (name == "get_num_outputs") {
return PackedFunc(
[sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->NumOutputs(); });
+ } else if (name == "get_num_inputs") {
+ return PackedFunc(
+ [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->NumInputs(); });
} else if (name == "run") {
return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { this->Run(); });
} else if (name == "load_params") {
*/
int NumOutputs() const;
/*!
+ * \brief Get the number of inputs
+ *
+ * \return The number of inputs to the graph.
+ */
+ int NumInputs() const;
+ /*!
* \brief Return NDArray for given input index.
* \param index The input index.
*