Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
to_remove = []
for class_idx in selected_classes:
if np.sum(y_train[:, class_idx] < 0.5) < 5 or np.sum(y_train[:, class_idx] > 0.5) < 5:
to_remove.append(class_idx)
for class_idx in to_remove:
selected_classes.remove(class_idx)
print('Removed classes with too few examples')
print(selected_classes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.