From 764559600746599c48915a1e7bbec78c911ffa2b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 15 Feb 2023 17:29:58 +0100 Subject: [PATCH] Remove unused `_adapt_string_lookup_layer` --- unimore_bda_6/analysis/tf_text.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/unimore_bda_6/analysis/tf_text.py b/unimore_bda_6/analysis/tf_text.py index 14b3a41..dfb96c5 100644 --- a/unimore_bda_6/analysis/tf_text.py +++ b/unimore_bda_6/analysis/tf_text.py @@ -74,15 +74,6 @@ class TensorflowSentimentAnalyzer(BaseSentimentAnalyzer, metaclass=abc.ABCMeta): return dataset - def _adapt_string_lookup_layer(self, dataset: tensorflow.data.Dataset) -> None: - """ - Adapt the `.string_lookup_layer` to the given dataset. - """ - log.debug("Preparing dataset to adapt %s...", self.string_lookup_layer) - dataset = dataset.map(lambda text, category: text) - log.debug("Adapting %s...", self.string_lookup_layer) - self.string_lookup_layer.adapt(dataset) - def train(self, training_dataset_func: CachedDatasetFunc, validation_dataset_func: CachedDatasetFunc) -> None: if self.failed: log.error("Tried to train a failed model.")