Natural Language Processing with TensorFlow by Thushan Ganegedara

Natural Language Processing with TensorFlow by Thushan Ganegedara

Author:Thushan Ganegedara
Language: eng
Format: epub, pdf
Tags: COM042000 - COMPUTERS / Natural Language Processing, MAT003000 - MATHEMATICS / Applied, COM013000 - COMPUTERS / Computer Literacy
Publisher: Packt
Published: 2022-07-26T10:25:52+00:00


You can implement a vanilla RNN by simply calling tf.keras.layers.SimpleRNN. Here we pass two important arguments. There are other useful arguments besides the two discussed here, however, they will be covered in later chapters with more complex variants of RNNs:

units (int) – This defines the hidden output size of the RNN model. The larger this is, the more representational power the model will have.

return_sequences (bool) – Whether to return outputs from all the timesteps, or to return only the last output. For NER tasks, we need to label every single token. Therefore we need to return outputs for all the time steps.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.