huawei-noah / Pretrained-Language-Model

Pretrained language model and its related optimization techniques developed by Huawei Noah's Ark Lab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

from transformer import modeling时报AttributeError: module 'cryptography.utils' has no attribute 'Enum'

huihuipiaomiao opened this issue · comments

import sys
sys.path.append('/path/TinyBERT/')
from transformer import modeling
model = modeling.TinyBertForSequenceClassification.from_pretrained('/path/chinese-roberta-wwm-ext', num_labels=num_labels)

class Encoding(utils.Enum):

AttributeError: module 'cryptography.utils' has no attribute 'Enum'