def check(self, x):
        """Record any information needed by transform."""
        if not isinstance(x, (np.ndarray, tf.data.Dataset)):
            raise TypeError(
                "Expect the data to TextInput to be numpy.ndarray or "
                "tf.data.Dataset, but got {type}.".format(type=type(x))
            )
Record any information needed by transform.
autokeras/adapters/input_adapters.py