Closed DLyzhou closed 4 years ago
(From https://github.com/clovaai/wsolevaluation/issues/7)
Try
--num_val_sample_per_class 0
Some CUBV2 classes have less than 5 samples per class.
Really quick response!
Yes, the num_val_sample_per_class 0 to 3 is doable. :smile:
Thanks for your work.
When I follow the guidance to run the code on CUB, the error says:
sampled_indices = np.random.choice( indices, self.num_sample_per_class, replace=False)
........
........
File "mtrand.pyx", line 946, in numpy.random.mtrand.RandomState.choice
ValueError: Cannot take a larger sample than population when 'replace=False'
Looking back to the config.py, the recommended setting is 'args.num_val_sample_per_class<=5' for CUB.
def check_dependency(args):
However, the bird category '059.California_Gull' only contains 3 images for validation while '002.Laysan_Albatross' and '007.Parakeet_Auklet' contains 6 images each. So this leads to the error above.
The solution is to expand the 059.California_Gull number from 3 to 5, or change the recommended num_val_sample_per_class=3. Feel strange there is no one meet with this problem before. :+1: