text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import tensorflow as tf

tf.__version__

data = pd.read_csv('../input/womens-ecommerce-clothing-reviews/Womens Clothing E-Commerce Reviews.csv', index_col=0)

data.shape

data = data[~data['Review Text'].isnull()]
data.shape

labels = tf.keras.utils.to_categorical(data['Recommended IND'])
output_shape = labels.shape[1]
(labels, output_shape)

v_size = 2000
max_len = 100
e_dim = 64
batch_size = 256

tf.keras.backend.clear_session()
model = tf.keras.models.Sequential([tf.keras.layers.Embedding(input_dim=v_size, output_dim=e_dim, name='embedding', mask_zero=True), tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(64)), tf.keras.layers.Dense(16, activation='relu'), tf.keras.layers.Dense(output_shape, activation='softmax')])
metrics = [tf.keras.metrics.CategoricalAccuracy()]
model.summary()