Keras-Text-Transfer-Learning
Keras-Text-Transfer-Learning copied to clipboard
Keras + Universal Sentence Encoder = Transfer Learning for text data
Model architecture ---> adam=keras.optimizers.Adam(lr=0.0001) early_stopping = keras.callbacks.ModelCheckpoint(filepath, monitor='val_acc', verbose=0, save_best_only=True, save_weights_only=False, mode='auto', period=10) input_text = Input(shape=(1,), dtype="string") embedding = Lambda(UniversalEmbedding, output_shape=(512, ))(input_text) dense = Dense(1024)(embedding) bnorm = BatchNormalization()(dense) acti =...
After get dataframe function cell, `df_train = get_dataframe('test_data.txt')` has been inserted. And model got trained on the same. 500 samples instead of 5452 samples.
There is a cell to read TEST data into the TRAINNG dataframe, "df_train = get_dataframe('test_data.txt')" right after reading the training data into the same dataframe, which makes 'train_text.shape' (500, 1)...