Hamas militant training has led to loud sounds of gunfire and explosions, heard in Gaza-adjacent towns in Israel.