Closed islamazhar closed 2 years ago
Hi,
I was trying to run the model for mnli in distribution and snli out of distribution dataset using the following command (The mnli model is already pretained)
mnli
snli
id_data="mnli" ood_data="snli" python3 msp_eval.py --model_path roberta_ckpts/roberta-$id_data --dataset_name $ood_data --fname ${id_data}_$ood_data --batch_size 8
However as snli has -1 class label showing the following error in criterion function which is nn.CrossEntropyLoss()
criterion
nn.CrossEntropyLoss()
https://github.com/uditarora/ood-text-emnlp/blob/c0e1dacbd3c89ebc30bd19e34d6f6db4ae7541eb/roberta_fine_tune.py#L140
The error message is:
cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [2,0,0] Assertion t >= 0 && t < n_classes failed.
t >= 0 && t < n_classes
How to solve the problem? Any suggestions? Thanks in advance.
Hi! You can filter out these examples during pre-preprocessing. This is what we did for our work separately. Let me know if you need help with it.
Hi,
I was trying to run the model for
mnli
in distribution andsnli
out of distribution dataset using the following command (Themnli
model is already pretained)However as
snli
has -1 class label showing the following error incriterion
function which isnn.CrossEntropyLoss()
https://github.com/uditarora/ood-text-emnlp/blob/c0e1dacbd3c89ebc30bd19e34d6f6db4ae7541eb/roberta_fine_tune.py#L140
The error message is:
cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [2,0,0] Assertion
t >= 0 && t < n_classes
failed.How to solve the problem? Any suggestions? Thanks in advance.