Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anubhavamd authored Jul 13, 2022
1 parent a4e5d4c commit b3e9671
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1860,23 +1860,31 @@ Follow these steps:
</tr>
</table>

1. Export the model.
<table width="100%" align="center">
<tr width="100%" align="center">
<td align="center"><img src="https://github.com/anubhavamd/Deep-Learning-Updated/blob/main/Text%20Classification%207.png">
</tr>
</table>

export\_model = tf.keras.Sequential([
vectorize\_layer,
model,
layers.Activation(&#39;sigmoid&#39;)
])
25. Export the model.

export\_model.compile(
loss=losses.BinaryCrossentropy(from\_logits=False), optimizer=&quot;adam&quot;, metrics=[&#39;accuracy&#39;]
)
```
export_model = tf.keras.Sequential([
vectorize_layer,
model,
layers.Activation('sigmoid')
])
export_model.compile(
loss=losses.BinaryCrossentropy(from_logits=False), optimizer="adam", metrics=['accuracy']
)
# Test it with `raw_test_ds`, which yields raw strings
loss, accuracy = export\_model.evaluate(raw\_test\_ds)
print(accuracy)
# Test it with `raw_test_ds`, which yields raw strings
loss, accuracy = export_model.evaluate(raw_test_ds)
print(accuracy)
```

1. To get predictions for new examples, simply call model.predict().
26. To get predictions for new examples, simply call model.predict().

examples = [
&quot;The movie was great!&quot;,
Expand Down

0 comments on commit b3e9671

Please sign in to comment.