Learning Wireless Sensor Networks for Source Localization