Comments (9)
The validation curve is attached and the best acc is 70.434.
Hope for your reply.
from repdistiller.
This is a great work. However, when I try to reproduce results on the ImageNet dataset, there is a 1% accuracy gap between mine and that in your paper.
Would you mind providing the hyper-parameters for training on ImageNet?
Here is mine:
-r 1.0
-a 0.0
-b 0.8
--trial 1
--weight_decay 0.0001
--learning_rate 0.1
--epochs 100
--lr_decay_epochs 30,60,90
--print_freq 500
--batch_size 256 \eight 1080Ti GPUs are used.
Thanks!
I met the problem today, have you solve this problem? I think the dataset is wrong, i will try to rewrite the code
from repdistiller.
This is a great work. However, when I try to reproduce results on the ImageNet dataset, there is a 1% accuracy gap between mine and that in your paper.
Would you mind providing the hyper-parameters for training on ImageNet?
Here is mine:
-r 1.0
-a 0.0
-b 0.8
--trial 1
--weight_decay 0.0001
--learning_rate 0.1
--epochs 100
--lr_decay_epochs 30,60,90
--print_freq 500
--batch_size 256
eight 1080Ti GPUs are used.
Thanks!I met the problem today, have you solve this problem? I think the dataset is wrong, i will try to rewrite the code
Not solved yet. I gave up.
Similar results were obtained in this repo.
https://github.com/yoshitomo-matsubara/torchdistill/tree/master/configs/official/ilsvrc2012/yoshitomo-matsubara/rrpr2020
from repdistiller.
This is a great work. However, when I try to reproduce results on the ImageNet dataset, there is a 1% accuracy gap between mine and that in your paper.
Would you mind providing the hyper-parameters for training on ImageNet?
Here is mine:
-r 1.0
-a 0.0
-b 0.8
--trial 1
--weight_decay 0.0001
--learning_rate 0.1
--epochs 100
--lr_decay_epochs 30,60,90
--print_freq 500
--batch_size 256
eight 1080Ti GPUs are used.
Thanks!I met the problem today, have you solve this problem? I think the dataset is wrong, i will try to rewrite the code
Not solved yet. I gave up.
Similar results were obtained in this repo.
https://github.com/yoshitomo-matsubara/torchdistill/tree/master/configs/official/ilsvrc2012/yoshitomo-matsubara/rrpr2020
i found test_set = datasets.ImageFolder(test_folder, transform=test_transform)
is wrong, test_set gets incorrect labels, i guess something has been done or processed in author's work. So i am coding this part, not difficult, expecting a normal result. ^v^
from repdistiller.
class TestImageDataset(Dataset):
def __init__(self, root, transform, classes2label=None):
super(TestImageDataset, self).__init__()
self.root = root
self.transform = transform
self.classes2label = classes2label
self.image_file_list, self.label_list = self.parse_txt()
def __len__(self):
return len(self.image_file_list)
def __getitem__(self, idx):
file = os.path.join(self.root,'images', self.image_file_list[idx])
img = Image.open(file).convert('RGB')
label = torch.tensor(int(self.label_list[idx])).long()
if self.transform is not None:
img = self.transform(img)
return img, label
def parse_txt(self):
annotation_path = os.path.join(self.root, 'val_annotations.txt')
image_file_list = []
label_list = []
with open(annotation_path, 'r') as f:
contents = f.readlines()
for content in contents:
image_file, classes_name = content.split('\t')[:2]
image_file_list.append(image_file)
label = self.classes2label[classes_name]
label_list.append(label)
return image_file_list, label_list
if is_instance:
train_set = ImageFolderInstance(train_folder, transform=train_transform)
n_data = len(train_set)
else:
train_set = datasets.ImageFolder(train_folder, transform=train_transform)
test_set = TestImageDataset(root=test_folder, transform=test_transform, classes2label=train_set.class_to_idx)
@kumamonatseu This code works! ^v^
from repdistiller.
@shaoeric thanks for your reply. it seems that codes of the dataset are already rewritten in another repo. anyway, hope for good news from you!
from repdistiller.
class TestImageDataset(Dataset): def __init__(self, root, transform, classes2label=None): super(TestImageDataset, self).__init__() self.root = root self.transform = transform self.classes2label = classes2label self.image_file_list, self.label_list = self.parse_txt() def __len__(self): return len(self.image_file_list) def __getitem__(self, idx): file = os.path.join(self.root,'images', self.image_file_list[idx]) img = Image.open(file).convert('RGB') label = torch.tensor(int(self.label_list[idx])).long() if self.transform is not None: img = self.transform(img) return img, label def parse_txt(self): annotation_path = os.path.join(self.root, 'val_annotations.txt') image_file_list = [] label_list = [] with open(annotation_path, 'r') as f: contents = f.readlines() for content in contents: image_file, classes_name = content.split('\t')[:2] image_file_list.append(image_file) label = self.classes2label[classes_name] label_list.append(label) return image_file_list, label_list
if is_instance: train_set = ImageFolderInstance(train_folder, transform=train_transform) n_data = len(train_set) else: train_set = datasets.ImageFolder(train_folder, transform=train_transform) test_set = TestImageDataset(root=test_folder, transform=test_transform, classes2label=train_set.class_to_idx)
@kumamonatseu This code works! ^v^
May I ask what the 'val_annotations.txt' is? I can't find it in ilsvrc2012. Thanks!
from repdistiller.
class TestImageDataset(Dataset): def __init__(self, root, transform, classes2label=None): super(TestImageDataset, self).__init__() self.root = root self.transform = transform self.classes2label = classes2label self.image_file_list, self.label_list = self.parse_txt() def __len__(self): return len(self.image_file_list) def __getitem__(self, idx): file = os.path.join(self.root,'images', self.image_file_list[idx]) img = Image.open(file).convert('RGB') label = torch.tensor(int(self.label_list[idx])).long() if self.transform is not None: img = self.transform(img) return img, label def parse_txt(self): annotation_path = os.path.join(self.root, 'val_annotations.txt') image_file_list = [] label_list = [] with open(annotation_path, 'r') as f: contents = f.readlines() for content in contents: image_file, classes_name = content.split('\t')[:2] image_file_list.append(image_file) label = self.classes2label[classes_name] label_list.append(label) return image_file_list, label_list
if is_instance: train_set = ImageFolderInstance(train_folder, transform=train_transform) n_data = len(train_set) else: train_set = datasets.ImageFolder(train_folder, transform=train_transform) test_set = TestImageDataset(root=test_folder, transform=test_transform, classes2label=train_set.class_to_idx)
@kumamonatseu This code works! ^v^
May I ask what the 'val_annotations.txt' is? I can't find it in ilsvrc2012. Thanks!
very glad to help you, but i run the code just on tiny-imagenet, so sorry
from repdistiller.
class TestImageDataset(Dataset): def __init__(self, root, transform, classes2label=None): super(TestImageDataset, self).__init__() self.root = root self.transform = transform self.classes2label = classes2label self.image_file_list, self.label_list = self.parse_txt() def __len__(self): return len(self.image_file_list) def __getitem__(self, idx): file = os.path.join(self.root,'images', self.image_file_list[idx]) img = Image.open(file).convert('RGB') label = torch.tensor(int(self.label_list[idx])).long() if self.transform is not None: img = self.transform(img) return img, label def parse_txt(self): annotation_path = os.path.join(self.root, 'val_annotations.txt') image_file_list = [] label_list = [] with open(annotation_path, 'r') as f: contents = f.readlines() for content in contents: image_file, classes_name = content.split('\t')[:2] image_file_list.append(image_file) label = self.classes2label[classes_name] label_list.append(label) return image_file_list, label_list
if is_instance: train_set = ImageFolderInstance(train_folder, transform=train_transform) n_data = len(train_set) else: train_set = datasets.ImageFolder(train_folder, transform=train_transform) test_set = TestImageDataset(root=test_folder, transform=test_transform, classes2label=train_set.class_to_idx)
@kumamonatseu This code works! ^v^
May I ask what the 'val_annotations.txt' is? I can't find it in ilsvrc2012. Thanks!
very glad to help you, but i run the code just on tiny-imagenet, so sorry
Thanks for reply
from repdistiller.
Related Issues (20)
- Cross modal KD implementation release? HOT 1
- Question on memory consumption for CRD loss when the dataset is very large HOT 3
- Why "opt.nce_k" in dataset cifar100 is 16384? How can I get this ? HOT 2
- test HOT 2
- Error while running the code
- Training scheme for linear probe on STL10 and TinyImagenet
- Problem of the order of the normalization in Similarity-Preserving loss.
- resnet structure seems to be a bit wrong HOT 3
- Failed to download the teacher models HOT 2
- about using the resnet models for cifar10 HOT 1
- crd used in image enhancement task like Denoise\SR\Deblur.
- Ensemble Task Implementation HOT 2
- Question about normalization constant Z_v1 and Z_v2 in the ContrastMemory
- Why using log_softmax instead of softmax? HOT 1
- Hyperparameter Settings for KD on Imagenet
- Is Ensemble distillation also included?
- the result is different in resnet56 HOT 1
- ERROR :run ./fetch_pretrained_teachers.sh HOT 1
- How to use myself datasets? HOT 1
- No dev set split
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repdistiller.