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

关于FNN #12

Open
aa147138 opened this issue Nov 20, 2018 · 4 comments
Open

关于FNN #12

aa147138 opened this issue Nov 20, 2018 · 4 comments

Comments

@aa147138
Copy link

您好,跑FNN的时候出现这个错误是什么情况?
RuntimeError: cuda runtime error (8) : invalid device function at /pytorch/aten/src/THC/generated/../generic/THCTensorMathReduce.cu:18

@MARMOTatZJU
Copy link

https://github.com/nzc/dnn_ctr/blob/master/model/FNN.py
这个里面536行的这句with torch.cuda.device(2):中的2改成0试一下。

@aa147138
Copy link
Author

已经改过了,在Quadro K4200上跑就会出现这个错误,在Tesla P100上跑就没问题。是计算能力的问题还是显存大小的问题?

@MARMOTatZJU
Copy link

这样的话有可能是显卡驱动的情况,也有可能是pytorch需要重新安装。建议如果方便的话重新安装一下pytorch。

@aa147138
Copy link
Author

aa147138 commented Nov 21, 2018

我有试过torch.cuda.is_available()这个操作,返回的事true,显卡驱动应该是没问题的吧?我的pytorch也是才装的,之前没用这个环境。用conda装的
另外,那个错误的定位是在这个地方
fm_first_order_emb_arr = [(torch.sum(emb(Xi[:,i,:]),1).t()*Xv[:,i]).t() for i, emb in enumerate(self.fm_first_order_embeddings)]

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

2 participants