Large-amplitude variables in Gaia Data Release 2