Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码无法执行 #7

Open
wangxidong06 opened this issue Mar 6, 2023 · 6 comments
Open

代码无法执行 #7

wangxidong06 opened this issue Mar 6, 2023 · 6 comments

Comments

@wangxidong06
Copy link

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
Copy link
Author

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

@xiaojing-503
Copy link

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

@shield124
Copy link

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

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

@iamhere1
Copy link

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

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

@shield124
Copy link

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

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

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

@iamhere1
Copy link

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

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants