Learning Latent Block Structure in Weighted Networks