当训练filne的张量流模型时,我使用了更高级别的api(例如feature_column),并使用导出api来保存模型
feature_spec = tf.feature_column.make_parse_example_spec(columns)
example_input_fn = (
tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec))
model.export_savedmodel(export_dir, example_input_fn)
现在我使用c ++ api加载该模型
tensorflow::LoadSavedModel(sess_options, run_options, modelpath, tags, &bundle)
and then how can i concact the input tensor,so that can finish predicting.
std::vector<std::pair<std::string, Tensor> > inputs;
status = session->Run(inputs, {"pctr"}, {}, &outputs);
有什么例子吗?