forked from mindspore-Ecosystem/mindspore
[GraphKernel] bert-crf enable graph kernel.
This commit is contained in:
parent
ccee6de15f
commit
e4b47e7193
|
@ -214,7 +214,7 @@ def run_ner():
|
|||
if bert_net_cfg.compute_type != mstype.float32:
|
||||
logger.warning('GPU only support fp32 temporarily, run with fp32.')
|
||||
bert_net_cfg.compute_type = mstype.float32
|
||||
if optimizer_cfg.optimizer == 'AdamWeightDecay' and args_opt.use_crf.lower() == "false":
|
||||
if optimizer_cfg.optimizer == 'AdamWeightDecay':
|
||||
context.set_context(enable_graph_kernel=True)
|
||||
else:
|
||||
raise Exception("Target error, GPU or Ascend is supported.")
|
||||
|
|
Loading…
Reference in New Issue