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_keras_like.py 513 B

12345678910111213141516171819202122232425262728
  1. import aggregation
  2. import decoder
  3. import encoder
  4. class Input(object):
  5. def __init__(self):
  6. pass
  7. class Trainer(object):
  8. def __init__(self, input, target, truth):
  9. pass
  10. def train(self):
  11. pass
  12. def test_keras_like():
  13. data_train, label_train = dataLoader("./data_path")
  14. x = Input()
  15. x = encoder.LSTM(input=x)
  16. x = aggregation.max_pool(input=x)
  17. y = decoder.CRF(input=x)
  18. trainer = Trainer(input=data_train, target=y, truth=label_train)
  19. trainer.train()

一款轻量级的自然语言处理(NLP)工具包,目标是减少用户项目中的工程型代码,例如数据处理循环、训练循环、多卡运行等