reacher-l / 2020-ai-road-segmentation

2020“华为云杯”人工智能大赛季军方案分享
4 stars 3 forks source link

同学,我在复现你这个代码的时候遇到个问题,想问下你之前遇到过么? #1

Open Jeacoo opened 3 years ago

Jeacoo commented 3 years ago

=> loading pretrained model True => loading pretrained model True 5069 images are loaded! 1157 images are loaded! config: /backbone=hrnet/warmup=100_lr=0.01_multiplier=100_eta_min=0.0005_num_epochs=150_batchsize=4 Epoch [1]/[150] lr=0.010000 0%| | 0/1267 [00:00<?, ?it/s]THCudaCheck FAIL file=/pytorch/aten/src/THC/THCCachingHostAllocator.cpp line=296 error=77 : an illegal memory access was encountered 0%| | 0/1267 [00:02<?, ?it/s] Traceback (most recent call last): File "train.py", line 267, in train_model() File "train.py", line 152, in train_model loss = calc_loss(outputs, labels, edge, metrics) File "/home/sankuai/road_extra/loss.py", line 446, in calc_loss loss_ls = lovasz_softmax(F.softmax(pred[1],dim=1),target) File "/home/sankuai/road_extra/loss.py", line 185, in lovasz_softmax loss = lovasz_softmax_flat(*flatten_probas(probas, labels, ignore), classes=classes) File "/home/sankuai/road_extra/loss.py", line 204, in lovasz_softmax_flat if (classes is 'present' and fg.sum() == 0): RuntimeError: CUDA error: an illegal memory access was encountered

WangGewu commented 3 years ago

没有遇到过诶

Jeacoo commented 3 years ago

没有遇到过诶

同学你这个里面是没有推理代码么?想问下能不能分享下推理代码啊,我看你readme里面还写了预测阶段trick,想看看怎么实现的。

WangGewu commented 3 years ago

没有遇到过诶

同学你这个里面是没有推理代码么?想问下能不能分享下推理代码啊,我看你readme里面还写了预测阶段trick,想看看怎么实现的。

已上传