wvangansbeke / LaneDetection_End2End

End-to-end Lane Detection for Self-Driving Cars (ICCV 2019 Workshop)
https://arxiv.org/pdf/1902.00293.pdf
Other
643 stars 216 forks source link

sementation runtime error,help! #60

Closed liuli610 closed 4 years ago

liuli610 commented 4 years ago

when I ran main.py --image_dir /home/images --gt_dir /home/ground_truth --nepochs 500--no_tb 0 --end_to_end False --clas 1 --nclasses 4 --batch_size 4, I got the following runtime error. And I change batch_size to 8, the error change to a(4) b(8). How could I fix the error? please

error: 0it [00:00, ?it/s]Batch with idx [2381 511 2252 360] skipped due to singular matrix The size of tensor a (2) must match the size of tensor b (4) at non-singleton dimension 0

ori_code :

Run model

        try:
            beta0, beta1, beta2, beta3, weightmap_zeros, M, \
            output_net, outputs_line, outputs_horizon = model(input, args.end_to_end)  
        except RuntimeError as e:
            print("Batch with idx {} skipped due to singular matrix".format(idx.numpy()))
            print(e)
            continue
wvangansbeke commented 4 years ago

Hi @liuli610,

Can you remove the try - catch statement to see the real error? From my experience, the matrix should become regular really quickly (depending on the initialization of course). I suspect it's probably another error. Also make sure that the Pytorch version is not older than specified in the readme.

Best, Wouter