未验证 提交 af57537e 编写于 作者: P Peihan 提交者: GitHub

remove dy2static test_lac predictor run case (#27844)

* remove test_lac predictor run case
上级 c5f2802d
......@@ -28,8 +28,6 @@ from paddle.fluid.dygraph import Embedding, Linear, GRUUnit
from paddle.fluid.dygraph import declarative, ProgramTranslator
from paddle.fluid.dygraph.io import INFER_MODEL_SUFFIX, INFER_PARAMS_SUFFIX
from predictor_utils import PredictorTools
SEED = 2020
program_translator = ProgramTranslator()
......@@ -540,7 +538,6 @@ class TestLACModel(unittest.TestCase):
dy_pre = self.predict_dygraph(batch)
st_pre = self.predict_static(batch)
dy_jit_pre = self.predict_dygraph_jit(batch)
predictor_pre = self.predict_analysis_inference(batch)
self.assertTrue(
np.allclose(dy_pre, st_pre),
msg="dy_pre:\n {}\n, st_pre: \n{}.".format(dy_pre, st_pre))
......@@ -548,10 +545,6 @@ class TestLACModel(unittest.TestCase):
np.allclose(dy_jit_pre, st_pre),
msg="dy_jit_pre:\n {}\n, st_pre: \n{}.".format(dy_jit_pre,
st_pre))
self.assertTrue(
np.allclose(predictor_pre, st_pre),
msg="predictor_pre:\n {}\n, st_pre: \n{}.".format(predictor_pre,
st_pre))
def predict_dygraph(self, batch):
words, targets, length = batch
......@@ -602,15 +595,6 @@ class TestLACModel(unittest.TestCase):
return pred_res.numpy()
def predict_analysis_inference(self, batch):
words, targets, length = batch
output = PredictorTools(self.args.model_save_dir,
self.args.model_filename,
self.args.params_filename, [words, length])
out = output()
return out
if __name__ == "__main__":
unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册