Chinese Ner inference profiling appears linear_chain_crf_grad op
Created by: bingyanghuang
When I downloaded the latest models and ran the train.sh , infer.sh in fluid/chinese_ner/scripts folder, I got the following profiling results:
linear_chain_crf_grad op should not appear in the inference program. In fact, in the train.py script, it saved "target" as the feed data with
fluid.io.save_inference_model(save_dirname, ['word', 'mention', 'target'], [crf_decode], exe)
and load models in inference with
feeder = fluid.DataFeeder(feed_list=[word, mention, target], place=place)
which doesn't make sense to load label data while doing the inference.
After I modified the infer.py ,train.py and let it neither save nor load "target", I got the following profiling results:
which seems correct.