标签: kaggle

2 篇文章

thumbnail
清除cuda显存
今天在kaggle上跑模型的时候发现,模型还没开始跑就已经占用了11G的显存。这时候就需要清除一下系统中缓存的显存占用。 显存 我们先来查看一下系统显存占用情况: import torch def get_gpu_memory(): gpu_memory = torch.cuda.memory_allocated() / 1024 / 1024 /…
thumbnail
huggingface登录方法notebook_login()失效
最近在使用kaggle的notebook跑模型的时候发现常规的notebook_login()方法竟然无效。而且用命令行模式的 huggingface-cli login 也没有反应。最后找到了神奇的解决办法。 就是在代码前加一行注释Σ(⊙▽⊙"a # I was having the same issue in Jupyter and …