Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#10 from feifei-111/test_bert
Browse files Browse the repository at this point in the history
test_bert
  • Loading branch information
2742195759 committed Jun 19, 2023
2 parents a60e744 + adfaae2 commit 787ad01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/dygraph_to_static/test_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import numpy as np
from bert_dygraph_model import PretrainModelLayer
from bert_utils import get_bert_config, get_feed_data_reader
from dygraph_to_static_util import ast_only_test
from predictor_utils import PredictorTools

import paddle
Expand Down Expand Up @@ -223,6 +224,7 @@ def predict_analysis_inference(self, data):
out = output()
return out

@ast_only_test
def test_train(self):
static_loss, static_ppl = self.train_static(
self.bert_config, self.data_reader
Expand All @@ -235,6 +237,7 @@ def test_train(self):

self.verify_predict()

@ast_only_test
def test_train_composite(self):
core._set_prim_backward_enabled(True)
# core._add_skip_comp_ops("layer_norm")
Expand Down

0 comments on commit 787ad01

Please sign in to comment.