- } else if (name == "load_params") {
- return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
- this->LoadParams(args[0].operator std::string());
- });
- } else if (name == "share_params") {
- return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
- const auto& module = args[0].operator Module();
- ICHECK_EQ(module.operator->()->type_key(), std::string("GraphExecutor"));
- const auto& param_blob = args[1].operator std::string();
- dmlc::MemoryStringStream strm(const_cast<std::string*>(¶m_blob));
- this->ShareParams(dynamic_cast<const GraphExecutor&>(*module.operator->()), &strm);
- });
- } else if (name == "get_input_index") {
- return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
- CHECK(String::CanConvertFrom(args[0])) << "Input key is not a string";
- *rv = this->GetInputIndex(args[0].operator String());
- });
- } else if (name == "get_input_info") {
- return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
- auto [shape_info, dtype_info] = this->GetInputInfo();
- Map<String, ObjectRef> input_info;