- numpy
- tensorflow
- scikit-learn
pip install numpy tensorflow scikit-learn
- Label Encoding
- Tokenisation
- Padding
-
Embedding Layer: Maps the input sequence of integers to a dense vector representation.
-
Flaten Layer: Convert the multi-dimensional output of the Embedding layer into a one-dimensional vector
-
Dense layer with ReLU activation: Introduces non-linearity to the model, allowing it to learn complex patterns in the data.
-
Output Layer with Softmax Activation Function: Produces probability scores for each class label
- Adam optimizer
- Sparse categorical crossentropy loss function
- input sequences
- encoded labels
- epochs
predicted label is then converted back into its original text form using the inverse_transform
method of the LabelEncoder