self-sort cnn