Eric-mingjie / network-slimming

Network Slimming (Pytorch) (ICCV 2017)
MIT License
907 stars 214 forks source link

Testing on SVHN #55

Closed kbui1993 closed 3 years ago

kbui1993 commented 4 years ago

Hi, I tried testing the code on SVHN, but the test accuracy isn't as high as the one in the paper. For example, on Densenet-40, I managed to get to around 96.5% with 20 epochs, but I expected it to be higher than 98% according to the paper. I tried normalizing as follows to see if it makes a different, but it didn't:

train_loader = torch.utils.data.DataLoader(
        datasets.SVHN('./data.SVHN', split = "train", download = True, transform =transforms.Compose([
                    transforms.ToTensor(), 
                    transforms.Normalize((0.4377, 0.4438, 0.4728), (0.1980, 0.2010, 0.1970)),
                ])),
        batch_size=args.batch_size, shuffle=True, **kwargs)
test_loader = torch.utils.data.DataLoader(
        datasets.SVHN('./data.SVHN', split = "test", download = True, transform = transforms.Compose([
                    transforms.ToTensor(),
                    transforms.Normalize((0.4377, 0.4438, 0.4728), (0.1980, 0.2010, 0.1970)),
                ])),
        batch_size =args.test_batch_size, shuffle = True, **kwargs)

Did you do anything else to SVHN?

Eric-mingjie commented 4 years ago

Sorry, we didn't test our code in SVNH.