Explosions heard at a military event in Venezuela were an attempted attack on president Nicolas Maduro, the country's government said.