LikeLy-Journey / SegmenTron

Support PointRend, Fast_SCNN, HRNet, Deeplabv3_plus(xception, resnet, mobilenet), ContextNet, FPENet, DABNet, EdaNet, ENet, Espnetv2, RefineNet, UNet, DANet, HRNet, DFANet, HardNet, LedNet, OCNet, EncNet, DuNet, CGNet, CCNet, BiSeNet, PSPNet, ICNet, FCN, deeplab)
Apache License 2.0
705 stars 162 forks source link

tainning voc dataset error #39

Open yangweixiang opened 4 years ago

yangweixiang commented 4 years ago

conda create --name pointrend python=3.6

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch

CUDA_VISIBLE_DEVICES=2 python -u tools/train.py --config-file configs/pascal_voc_deeplabv3_plus.yaml

[THOP Defined] Conv2d [THOP Defined] BatchNorm2d [THOP Defined] ReLU [THOP Defined] Conv2d [THOP Defined] BatchNorm2d [THOP Defined] ReLU [THOP Defined] Conv2d [THOP Defined] BatchNorm2d [THOP Defined] ReLU [THOP Defined] Conv2d [THOP Defined] BatchNorm2d [THOP Defined] ReLU [THOP Defined] Conv2d <class 'torch.Tensor'> 2020-04-10 15:14:51,053 Segmentron WARNING: get flops and params error: new() received an invalid combination of arguments - got (list, dtype=torch.dtype), but expected one of:

2020-04-10 15:14:51,054 Segmentron INFO: Not use SyncBatchNorm! 2020-04-10 15:14:51,054 Segmentron INFO: Set bn custom eps for bn in encoder: 0.001 2020-04-10 15:14:51,060 Segmentron INFO: Start training, Total Epochs: 50 = Total Iterations 9150 <class 'torch.Tensor'> Traceback (most recent call last): File "tools/train.py", line 221, in trainer.train() File "tools/train.py", line 133, in train outputs = self.model(images) File "/home/yangwx/anaconda2/envs/pointrend/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, *kwargs) File "/mnt/data2/yangwx/GIT/SegmenTron/segmentron/models/deeplabv3plus.py", line 36, in forward c1, , c3, c4 = self.encoder(x) File "/home/yangwx/anaconda2/envs/pointrend/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(input, **kwargs) File "/mnt/data2/yangwx/GIT/SegmenTron/segmentron/models/backbones/xception.py", line 131, in forward x = self.conv1(x) File "/home/yangwx/anaconda2/envs/pointrend/lib/python3.6/site-packages/torch/nn/modules/module.py", line 495, in call hook_result = hook(self, input, result) File "/home/yangwx/anaconda2/envs/pointrend/lib/python3.6/site-packages/thop/vision/basic_hooks.py", line 27, in count_convNd m.total_ops += torch.DoubleTensor([int(total_ops)], dtype=torch.float64) TypeError: new() received an invalid combination of arguments - got (list, dtype=torch.dtype), but expected one of:

LikeLy-Journey commented 4 years ago

You can try to comment these lines: https://github.com/LikeLy-Journey/SegmenTron/blob/master/tools/train.py#L65-L69