From f0dc8f7f500c96bea58898862927d20451c3065f Mon Sep 17 00:00:00 2001 From: MRXLT Date: Wed, 13 May 2020 17:44:03 +0800 Subject: [PATCH] fix bert 10 mins doc --- doc/BERT_10_MINS_CN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/BERT_10_MINS_CN.md b/doc/BERT_10_MINS_CN.md index 17592000..b7a5180d 100644 --- a/doc/BERT_10_MINS_CN.md +++ b/doc/BERT_10_MINS_CN.md @@ -13,10 +13,10 @@ import paddlehub as hub model_name = "bert_chinese_L-12_H-768_A-12" module = hub.Module(model_name) inputs, outputs, program = module.context(trainable=True, max_seq_len=20) -feed_keys = ["input_ids", "position_ids", "segment_ids", "input_mask", "pooled_output", "sequence_output"] +feed_keys = ["input_ids", "position_ids", "segment_ids", "input_mask"] fetch_keys = ["pooled_output", "sequence_output"] feed_dict = dict(zip(feed_keys, [inputs[x] for x in feed_keys])) -fetch_dict = dict(zip(fetch_keys, [outputs[x]] for x in fetch_keys)) +fetch_dict = dict(zip(fetch_keys, [outputs[x] for x in fetch_keys])) import paddle_serving_client.io as serving_io serving_io.save_model("bert_seq20_model", "bert_seq20_client", feed_dict, fetch_dict, program) -- GitLab