-
Notifications
You must be signed in to change notification settings - Fork 182
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
报错 #10
Comments
是pytorch版本的问题,cuda9.0好像不能安装pytorch==1.4.0。我在pytor网站上https://download.pytorch.org/whl/torch_stable.html,没有看到cuda9.0对应的版本 |
我昨天在官网用这个命令pip install torch==1.4.0+cu92 torchvision==0.5.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
试着下载了pytorch==1.4.0但是这个命令要求的是cuda==9.2(而我的机器还只是cuda==9.0),下载成功后,我试着运行了,但是运行一小会儿就结束了,
报错RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.33 GiB already allocated; 1
5.26 MiB free; 1.36 GiB reserved in total by PyTorch)
可能是我的gpu内存不够只有2GB,但是空闲容量为什么那么少,使用了with torch.no_grad()和torch.cuda.empty_cache()但是还是不够,什么原因导致的呢?
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2021年3月28日(星期天) 上午8:59
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [liucongg/GPT2-NewsTitle] 报错 (#10)
pytorch
是pytorch版本的问题,cuda9.0好像不能安装pytorch==1.4.0。我在pytor网站上https://download.pytorch.org/whl/torch_stable.html,没有看到cuda9.0对应的版本
如果你想尝试的跑通代码的话,可以安装cpu版本的torch。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
是的,显存不够 |
我的机器是cuda=9.0 pytorch==1.2.0
然后运行过程会报错AttributeError: 'Tensor' object has no attribute 'bool'
我觉得应该是pytorch版本的问题,cuda9.0是否能安装pytorch==1.4.0
在model.py中的
mask = (token_type_ids == title_id).long()
labels = labels * mask这一段可能出现了问题,请问如何解决呢?
The text was updated successfully, but these errors were encountered: