timoschick / pet

This repository contains the code for "Exploiting Cloze Questions for Few-Shot Text Classification and Natural Language Inference"
https://arxiv.org/abs/2001.07676
Apache License 2.0
1.62k stars 283 forks source link

为什么会提示AttributeError: 'bool' object has no attribute 'mean' #68

Open Dxy-cpu opened 3 years ago

Dxy-cpu commented 3 years ago

1637408331(1)

timoschick commented 2 years ago

Hi @Dxy-cpu, could you provide some further information? What command are you using to run PET? What dataset are you training on? The error seems to occur when the model computes predictions for the unlabeled data, so it would also be interesting to know how much unlabeled data you are providing via your DataProcessor's get_unlabeled_examples method.

Dxy-cpu commented 2 years ago

Thank you very much for your reply! I am training the model on the dataset of the CB task. The command is “ !python cli.py \ --method pet \ --pattern_ids 0 1 2 3 4\ --data_dir /content/drive/MyDrive/pet-master/fewglue-master/FewGLUE/CB \ --model_type albert \ --model_name_or_path albert-xxlarge-v2 \ --task_name cb \ --output_dir output_dir \ --do_train \ --do_eval When there is a problem in scientific research, I am undoubtedly very pleased to see your reply. I am very happy that the program is now running normally.

hjing100 commented 1 year ago

你好,请问可以用于中文语料吗