lonePatient / ERNIE-text-classification-pytorch

This repo contains a PyTorch implementation of a pretrained ERNIE model for text classification.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

you may miss something the model needed

yuanjun1991 opened this issue · comments

when i download the ernie_base from panbaidu,and run fine_tune_ernie.py , it raise error as follows:

File "/Users/yuanjun/Downloads/ERNIE-text-classification-pytorch-master/fine_tune_ernie.py", line 8, in
from pyernie.io.dataset import CreateDataset
File "/Users/yuanjun/Downloads/ERNIE-text-classification-pytorch-master/pyernie/io/dataset.py", line 5, in
from pytorch_pretrained_bert.tokenization import BertTokenizer
ModuleNotFoundError: No module named 'pytorch_pretrained_bert'

@yuanjun1991 hi,in file "/pyernie/io/dataset.py", line 5 , changed to from ..model.ernie.tokenization import BertTokenizer