WenmuZhou / PAN.pytorch

A unofficial pytorch implementation of PAN(PSENet2): Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network
Apache License 2.0
418 stars 112 forks source link

不能使用gpu训练 #18

Closed wuxiaolianggit closed 5 years ago

wuxiaolianggit commented 5 years ago

@WenmuZhou 请问大佬,训练的时候只可以启动不了gpu,这是怎么回事呢

wuxiaolianggit commented 5 years ago
           'type': 'Adam'},

'trainer': {'display_interval': 10, 'epochs': 600, 'finetune_checkpoint': '', 'gpus': [0], 'metrics': 'hmean', 'output_dir': '/wuxl1/PAN.pytorch/output', 'resume_checkpoint': '', 'seed': 2, 'show_images_interval': 50, 'tensorboard': True}} 2019-11-15 10:03:45 INFO base_trainer.py[line:58]: train with cpu and pytorch 1.3.1+cu92 2019-11-15 10:03:45 INFO base_trainer.py[line:60]: device cpu 2019-11-15 10:03:45 WARNING base_trainer.py[line:93]: add graph to tensorboard failed 2019-11-15 10:03:45 INFO trainer.py[line:31]: train dataset has 2000 samples,125 in dataloader /usr/local/lib/python3.5/dist-packages/torch/nn/functional.py:2494: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode)) 2019-11-15 10:10:40 INFO trainer.py[line:82]: [1/600], [10/125], global_step: 10, Speed: 0.4 samples/sec, acc: 0.7197, iou_text: 0.4942, iou_kernel: 0.7139, loss_all: 0.4835, loss_tex: 0.2199, loss_ker: 0.2121, loss_agg: 0.2339, loss_dis: 0.3960, lr:0.001, time:415.46

@WenmuZhou 只能使用cpu训练,这怎么解决呢

WenmuZhou commented 5 years ago

运行torch.cuda.is_available()看看

wuxiaolianggit commented 5 years ago

多谢大佬提醒,已经解决这个问题了 @WenmuZhou

WenmuZhou commented 5 years ago

好的