Fernando Torres has announced that he will leave Atletico Madrid at the end of the 2017-18 season, but vows to continue playing football elsewhere.