Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "", line 1, in
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/init.py", line 24, in
from paddlehub import datasets
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/init.py", line 18, in
from paddlehub.datasets.chnsenticorp import ChnSentiCorp
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/chnsenticorp.py", line 19, in
from paddlehub.datasets.base_nlp_dataset import TextClassificationDataset
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/base_nlp_dataset.py", line 23, in
from paddlenlp.transformers import PretrainedTokenizer
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/init.py", line 24, in
from . import data
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/data/init.py", line 16, in
from .data_collator import
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/data/data_collator.py", line 23, in
from ..transformers.tokenizer_utils_base import BatchEncoding, PretrainedTokenizerBase, PaddingStrategy
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/transformers/init.py", line 26, in
from .electra.modeling import
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/transformers/electra/modeling.py", line 20, in
from paddle.nn.layer.transformer import _convert_attention_mask
ImportError: cannot import name '_convert_attention_mask'
硬件:Jetson Nano 2G cuda:10.2 cudnn:8.0.0 paddlepaddle-gpu:2.0.2 paddlehub:2.0.0 paddlenlp:2.3.3
在Python终端中输入import paddlehub后输出以下报错
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat Traceback (most recent call last): File "", line 1, in
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/init.py", line 24, in
from paddlehub import datasets
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/init.py", line 18, in
from paddlehub.datasets.chnsenticorp import ChnSentiCorp
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/chnsenticorp.py", line 19, in
from paddlehub.datasets.base_nlp_dataset import TextClassificationDataset
File "/home/tringai/.local/lib/python3.6/site-packages/paddlehub/datasets/base_nlp_dataset.py", line 23, in
from paddlenlp.transformers import PretrainedTokenizer
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/init.py", line 24, in
from . import data
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/data/init.py", line 16, in
from .data_collator import
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/data/data_collator.py", line 23, in
from ..transformers.tokenizer_utils_base import BatchEncoding, PretrainedTokenizerBase, PaddingStrategy
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/transformers/init.py", line 26, in
from .electra.modeling import
File "/home/tringai/.local/lib/python3.6/site-packages/paddlenlp/transformers/electra/modeling.py", line 20, in
from paddle.nn.layer.transformer import _convert_attention_mask
ImportError: cannot import name '_convert_attention_mask'
求解答