GOATmessi8/ASFF

TypeError: leaky_relu(): argument 'input' (position 1) must be Tensor, not NoneType

ys0823 opened this issue · 0 comments

When I ranmain.pyin my dataset, I got this error:
/home/tanglin/anaconda3/envs/asff/bin/python /data/tanglin/ASFF/asff/ASFF/main.py Setting Arguments.. : Namespace(asff=False, cfg='config/yolov3_baseline.cfg', checkpoint=None, dataset='VOC', debug=False, distributed=False, dropblock=False, eval_interval=10, half=False, local_rank=0, log_dir='log/', n_cpu=4, ngpu=4, no_wd=False, rfb=False, save_dir='save', start_epoch=0, test=False, test_size=608, testset=False, tfboard=False, use_cuda=True, vis=False) successfully loaded config file: {'MODEL': {'TYPE': 'YOLOv3', 'BACKBONE': 'darknet53'}, 'TRAIN': {'LR': 0.001, 'MOMENTUM': 0.9, 'DECAY': 0.0005, 'BURN_IN': 5, 'MAXEPOCH': 300, 'COS': True, 'SYBN': True, 'MIX': True, 'NO_MIXUP_EPOCHS': 30, 'LABAL_SMOOTH': True, 'BATCHSIZE': 5, 'IMGSIZE': 608, 'IGNORETHRE': 0.7, 'RANDRESIZE': True}, 'TEST': {'CONFTHRE': 0.01, 'NMSTHRE': 0.65, 'IMGSIZE': 608}} Training YOLOv3 strong baseline! Warning: using Python fallback for SyncBatchNorm, possibly because apex was installed without --cuda_ext. The exception raised when attempting to import the cuda backend was: /home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/apex-0.1-py3.6-linux-x86_64.egg/syncbn.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE using cuda Traceback (most recent call last): File "/data/tanglin/ASFF/asff/ASFF/main.py", line 470, in <module> main() File "/data/tanglin/ASFF/asff/ASFF/main.py", line 400, in main loss_dict = model(imgs, targets, epoch) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply raise output File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker output = module(*input, **kwargs) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/data/tanglin/ASFF/asff/ASFF/models/yolov3_baseline.py", line 111, in forward x = module(x) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward input = module(input) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/modules/activation.py", line 561, in forward return F.leaky_relu(input, self.negative_slope, self.inplace) File "/home/tanglin/anaconda3/envs/asff/lib/python3.6/site-packages/torch/nn/functional.py", line 1099, in leaky_relu result = torch._C._nn.leaky_relu(input, negative_slope) TypeError: leaky_relu(): argument 'input' (position 1) must be Tensor, not NoneType

I just changed the classes, I don't know the reason, my environment is Pytorch1.1.0 and cuda 9.0 could you help me? @ruinmessi