Discriminative Learning of Sum-Product Networks