Skip to content

Commit

Permalink
adapt to tf 2.5.0 (#1564)
Browse files Browse the repository at this point in the history
Co-authored-by: Haifeng Jin <[email protected]>
  • Loading branch information
haifeng-jin and haifeng-jin authored May 16, 2021
1 parent 94ac836 commit 09c06f7
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 100 deletions.
5 changes: 4 additions & 1 deletion autokeras/blocks/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def build(self, hp, inputs=None):
else:
ngrams = hp.Int("ngrams", min_value=1, max_value=2, default=2)
return preprocessing.TextVectorization(
max_tokens=self.max_tokens, ngrams=ngrams, output_mode="tf-idf"
max_tokens=self.max_tokens,
ngrams=ngrams,
output_mode="tf-idf",
pad_to_max_tokens=True,
)(input_node)

def get_config(self):
Expand Down
Loading

0 comments on commit 09c06f7

Please sign in to comment.