remove dy2static test_lac predictor run case (#27844)

* remove test_lac predictor run case
my_2.0rc
Peihan 4 years ago committed by GitHub
parent c5f2802d56
commit af57537ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()

Loading…
Cancel
Save