Learning Discrete Weights and Activations Using the Local Reparameterization Trick