Error encountered while using prompt-based classification
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 520
- PR merge metrics
- No merged PRs in 30d
Description
The command:
```
python3 finetune/run_classifier_prompt.py --pretrained_model_path models/google_zh_model.bin \
--vocab_path models/google_zh_vocab.txt \
--config_path models/bert/base_config.json \
--train_path datasets/douban_book_review/train.tsv \
--dev_path datasets/douban_book_review/dev.tsv \
--test_path datasets/douban_book_review/test.tsv \
--prompt_path models/prompts.json --prompt_id chnsenticorp_char \
--learning_rate 3e-5 --epochs_num 3 --batch_size 64
```
Error report:
```
File "finetune/run_classifier_prompt.py", line 45, in forward
logits = logits * self.answer_position
RuntimeError: expected device cuda:0 and dtype Float but got device cuda:0 and dtype Long
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.