You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for sharing your code. I ran your code on ellipse and rectangle and it worked but when I ran it on my own dataset ( Labeled Faced in the Wild-LFW) I get the below error:
Total 7804 images, split into 1000 classes
Classes:
{'Aaron_Peirsol': 0, 'Abdoulaye_Wade': 1, 'Abdullah': 2, 'Abdullah_Gul': 3, 'Abdullah_al-Attiyah': 4, 'Abel_Pacheco': 5, 'Abid_Hamid_Mahmud_Al-Tikriti': 6, 'Adam_Sandler': 7,$
Traceback (most recent call last):
File "dream-creator-master/train_googlenet.py", line 171, in
main()
File dream-creator-master/train_googlenet.py", line 51, in main
main_func(params)
File "dream-creator-master/train_googlenet.py", line 65, in main_func
training_data, num_classes, class_weights = load_dataset(data_path=params.data_path, val_percent=params.val_percent, batch_size=params.batch_size,
File "dream-creator-master/utils/training_utils.py", line 85, in load_dataset
train_weights = [1 / train_class_counts[class_id] for class_id in range(num_classes)]
File "dream-creator-master/utils/training_utils.py", line 85, in
train_weights = [1 / train_class_counts[class_id] for class_id in range(num_classes)]
KeyError: 169
Do you have any idea how I can solve it, thanks.
The text was updated successfully, but these errors were encountered:
I could solve the problem. I had some identities with 2 samples that after splitting the dataset into train and validation there wasn't any samples inside of validation and it cause the problem. So, we need to make sure to have enough sample to split it into 80%-20% (train-validation)
Thanks for sharing your code. I ran your code on ellipse and rectangle and it worked but when I ran it on my own dataset ( Labeled Faced in the Wild-LFW) I get the below error:
Total 7804 images, split into 1000 classes
Classes:
{'Aaron_Peirsol': 0, 'Abdoulaye_Wade': 1, 'Abdullah': 2, 'Abdullah_Gul': 3, 'Abdullah_al-Attiyah': 4, 'Abel_Pacheco': 5, 'Abid_Hamid_Mahmud_Al-Tikriti': 6, 'Adam_Sandler': 7,$
Traceback (most recent call last):
File "dream-creator-master/train_googlenet.py", line 171, in
main()
File dream-creator-master/train_googlenet.py", line 51, in main
main_func(params)
File "dream-creator-master/train_googlenet.py", line 65, in main_func
training_data, num_classes, class_weights = load_dataset(data_path=params.data_path, val_percent=params.val_percent, batch_size=params.batch_size,
File "dream-creator-master/utils/training_utils.py", line 85, in load_dataset
train_weights = [1 / train_class_counts[class_id] for class_id in range(num_classes)]
File "dream-creator-master/utils/training_utils.py", line 85, in
train_weights = [1 / train_class_counts[class_id] for class_id in range(num_classes)]
KeyError: 169
Do you have any idea how I can solve it, thanks.
The text was updated successfully, but these errors were encountered: