PRM
PRM copied to clipboard
关于使用cpu的问题
作者您好,我看你的介绍时说可以使用cpu训练,但速度很慢,现在我受条件限制只能用cpu,在运行demo时报了这个错: ~\Nest-pytorch\install\trainer.py in network_trainer(data_loaders, model, criterion, optimizer, parameter, meters, hooks, max_epoch, test_interval, resume, log_path, device, use_data_parallel, use_cudnn_benchmark, random_seed) 74 device = torch.device(device) 75 if device.type == 'cuda': ---> 76 assert torch.cuda.is_available(), 'CUDA is not available.' 77 torch.backends.cudnn.benchmark = use_cudnn_benchmark 很明显这是没装cuda的结果,但nest作为一个网上基本查不到资料的工具,我也不知道该怎么改才能继续在cpu状态训练,希望您能回答我,谢谢。
Hi @lz666win ,
Apologize for I haven't provided detailed documentation for the Nest built-in module yet, but for now, you can check the README and source code for basic usage. If you want to train the model using CPU mode, you can simply replace this line of the config.yml with device: cpu
.
你好,我在按照你的指导后修改了config.yml ,现在执行这句话时,系统运行了很久也没有运行完: backbone = modules.fc_resnet50(num_classes=20, pretrained=False) print(backbone) 看了一下没有运行过的notebook的结果,这应该是50层的resnet的网络结构,既然上面的config.yml 运行都没有问题,按说这句应该也没问题才对,我的笔记本也是i7内核,不像内核跟不上的情况,还望您指导一下,谢谢。