NLP text processing toolkit for Deep Learning
Project description
FERN
Fern用于NLP的模型开发结构控制。通过它可以控制文本预处理、模型搭建、训练器:
- 文本预处理:数据下载、数据清洗、数据转换和数据分割
- 模型搭建:模型保存与加载、模型架构打印
- 模型训练:单步/epoch训练与评估、评估函数设置、损失函数设置、label权重设置
Fern的设计目的主要为了解决不同NLP工程中重复代码过多问题,减少流程性代码,从而避免数据交互过程中的随机bug出现
安装
-
从
pypi安装$ pip install Fern2
-
从源码安装
$ pip install -e git+https://github.com/Jasonsey/Fern.git
使用教程
建议查看源码中函数的使用说明
变量命名规则
为了方便定义,对容易分歧变量命名做如下约定:
-
对于数据变量,同类型变量书写规则:
data_train,data_vallabel_train,label_val
-
对于指标变量,同类型变量书写规则:
val_loss,val_acc,val_binary_acctrain_loss,train_acc
-
对于其他变量,按照
首先它属于a, 其次它属于b规则命名变量名:a_bpath_dataset
TODO
- BERT预训练模型直接调用
- BERT重现训练代码直接调用
版本变更日志
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Fern2-1.3.0.dev1.tar.gz
(36.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Fern2-1.3.0.dev1.tar.gz.
File metadata
- Download URL: Fern2-1.3.0.dev1.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aff620a95c75aae89e387ae1a6a81036bb9246a968a79f568031549dd988f208
|
|
| MD5 |
ad143f66b28b26859a6c16f0f639d4c7
|
|
| BLAKE2b-256 |
a2148d4fc902e58f0b8fc704faaaf519e286cfae22738c7647c4a3f8e0533b4e
|
File details
Details for the file Fern2-1.3.0.dev1-py3-none-any.whl.
File metadata
- Download URL: Fern2-1.3.0.dev1-py3-none-any.whl
- Upload date:
- Size: 43.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d977a1d4f51b605b14fcde7dd365d114e9c93db88787d40b1724d0f1a9f09606
|
|
| MD5 |
ce86726bb09a83b335a44569f2dd4d37
|
|
| BLAKE2b-256 |
d2d605022ebcd408adb6c86ae5374cb0be24339016e785dbb6eb5b949a1853ce
|