1.4 KiB
1.4 KiB
Easy Start
English | 简体中文
Requirements
python == 3.8
- torch == 1.5
- hydra-core == 1.0.6
- tensorboard == 2.4.1
- matplotlib == 3.4.1
- scikit-learn == 0.24.1
- transformers == 3.4.0
- jieba == 0.42.1
- deepke
Download Code
git clone https://github.com/zjunlp/DeepKE.git
cd DeepKE/example/ae/standard
Install with Pip
- Create and enter the python virtual environment.
- Install dependencies:
pip install -r requirements.txt
.
Train and Predict
-
Dataset
-
Download the dataset to this directory.
wget 120.27.214.45/Data/ae/standard/data.tar.gz tar -xzvf data.tar.gz
-
The dataset is stored in
data/origin
:train.csv
: Training setvalid.csv
: Validation settest.csv
: Test setattribute.csv
: Attribute types
-
-
Training
-
Parameters for training are in the
conf
folder and users can modify them before training. -
If using LM, modify
lm_file
to use the local model. -
Logs for training are in the
log
folder and the trained model is saved in thecheckpoints
folder.
python run.py
-
-
Prediction
python predict.py
Models
- CNN
- RNN
- Capsule
- GCN
- Transformer
- Pre-trained Model (BERT)