Skip to content

Commit

Permalink
Load text tutorial: Remove unecessary +1 from VOCAB_SIZE+1
Browse files Browse the repository at this point in the history
  • Loading branch information
vaharoni committed Aug 27, 2023
1 parent e4ab8e0 commit 8822d90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions site/en/tutorials/load_data/text.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,7 @@
},
"outputs": [],
"source": [
"# `vocab_size` is `VOCAB_SIZE + 1` since `0` is used additionally for padding.\n",
"int_model = create_model(vocab_size=VOCAB_SIZE + 1, num_labels=4)\n",
"int_model = create_model(vocab_size=VOCAB_SIZE, num_labels=4)\n",
"int_model.compile(\n",
" loss=losses.SparseCategoricalCrossentropy(from_logits=True),\n",
" optimizer='adam',\n",
Expand Down

0 comments on commit 8822d90

Please sign in to comment.