lingochamp / Multi-Scale-BERT-AES

Demo for the paper "On the Use of BERT for Automated Essay Scoring: Joint Learning of Multi-Scale Essay Representation"
56 stars 13 forks source link

代码无法执行 #7

Open wangxidong06 opened 1 year ago

wangxidong06 commented 1 year ago

File "predict_multi_scale_multi_loss.py", line 52, in model.predict_for_regress((test_documents, test_labels)) File "/Multi-Scale-BERT-AES/model_architechure_bert_multi_scale_multi_loss.py", line 72, in predict_for_regress batch_predictions_word_document = self.bert_regression_by_word_document(batch_document_tensors_word_document, device=self.args['device']) File "/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/Multi-Scale-BERT-AES/document_bert_architectures.py", line 75, in forward attention_mask=document_batch[doc_id][:self.bert_batch_size, 2]) File "/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(input, **kwargs) RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)

wangxidong06 commented 1 year ago

最终解决了,看样子是版本问题,我更新了torch和transformers到最新版本,结果错误解除~

xiaojing-503 commented 1 year ago

请问这个怎么设置啊,那个网盘下载的东西放在哪啊,求教!!!

shield124 commented 1 year ago

最终解决了,看样子是版本问题,我更新了torch和transformers到最新版本,结果错误解除~

请问你最后有实现训练模型的代码吗?可以分享下吗?

iamhere1 commented 1 year ago

请问这个怎么设置啊,那个网盘下载的东西放在哪啊,求教!!!

抱歉,百度网盘下载好像有问题,可以试试这个地址:https://workdrive.zohopublic.com.cn/file/dfpvf0458d50be9664034829928a666b68651

shield124 commented 1 year ago

请问这个怎么设置啊,那个网盘下载的东西放在哪啊,求教!!!

抱歉,百度网盘下载好像有问题,可以试试这个地址:https://workdrive.zohopublic.com.cn/file/dfpvf0458d50be9664034829928a666b68651

作者大大,可以分享下train模型的代码吗?研一入门小白实在难以自己写出来训练的代码,感谢您!

iamhere1 commented 1 year ago

请问这个怎么设置啊,那个网盘下载的东西放在哪啊,求教!!!

抱歉,百度网盘下载好像有问题,可以试试这个地址:https://workdrive.zohopublic.com.cn/file/dfpvf0458d50be9664034829928a666b68651

作者大大,可以分享下train模型的代码吗?研一入门小白实在难以自己写出来训练的代码,感谢您!

你好,针对你目前的情况,可以先尝试跑下预测的代码,看是否正常。预测代码正常后,你理解下预测代码,主要的实现逻辑在公开的预测代码有了。你理解预测后再尝试着加下损失函数和更新梯度的逻辑就好,在加的过程中如果有问题,欢迎继续交流。