inplace_abn icon indicating copy to clipboard operation
inplace_abn copied to clipboard

Performance drops compared with Pytorch0.4.1

Open PkuRainBow opened this issue 5 years ago • 3 comments

Really good work! We have attempted to train our model with the pytorch1.2 and the updated your latest inplace ABN. We find that the performance (with all the same training settings) slightly drops compared with the previous pytorch0.4.1.

We report their results on Cityscapes val set as below,

pytorch1.2 FCN (ResNet101) : 75.5 pytorch0.4.1 FCN (ResNet101) : 76.0

It would be great if anyone could share with me some advice!

PkuRainBow avatar Aug 30 '19 03:08 PkuRainBow

Hi, are you using the same random seeds for numpy, cuda and dataloader?

bwang-delft avatar Sep 16 '19 14:09 bwang-delft

@bwang-delft We simple set the random seeds as below (the default value of seed is 304),

        random.seed(args_parser.seed)
        torch.manual_seed(args_parser.seed)

PkuRainBow avatar Sep 16 '19 14:09 PkuRainBow

@bwang-delft We simple set the random seeds as below (the default value of seed is 304),

        random.seed(args_parser.seed)
        torch.manual_seed(args_parser.seed)

I think you also need to set the random seed for CUDA if you are using GPU. I'm not sure how to set the random seed for dataloader. I think https://github.com/pytorch/pytorch/issues/7068 discusses how to do that

bwang-delft avatar Sep 16 '19 23:09 bwang-delft