Generalization bounds for deep thresholding networks