You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_star_trans.py 534 B

12345678910111213141516
  1. from .model_runner import *
  2. from fastNLP.models.star_transformer import STNLICls, STSeqCls, STSeqLabel
  3. # add star-transformer tests, for 3 kinds of tasks.
  4. def test_cls():
  5. model = STSeqCls((VOCAB_SIZE, 10), NUM_CLS, dropout=0)
  6. RUNNER.run_model_with_task(TEXT_CLS, model)
  7. def test_nli():
  8. model = STNLICls((VOCAB_SIZE, 10), NUM_CLS, dropout=0)
  9. RUNNER.run_model_with_task(NLI, model)
  10. def test_seq_label():
  11. model = STSeqLabel((VOCAB_SIZE, 10), NUM_CLS, dropout=0)
  12. RUNNER.run_model_with_task(POS_TAGGING, model)