    def initialize(self):
        """
        Call this function before running attack_from_json(). We put the call to
        `_construct_embedding_matrix()` in this function to prevent a large amount of compute
        being done when __init__() is called.
        """
        if self.embedding_matrix is None:
            self.embedding_matrix = self._construct_embedding_matrix()
Call this function before running attack_from_json(). We put the call to
`_construct_embedding_matrix()` in this function to prevent a large amount of compute
being done when __init__() is called.
allennlp/interpret/attackers/hotflip.py