Home > APEX > Storage > White Papers > Sentiment Analysis using Dell APEX File Storage for AWS and Amazon SageMaker > Step 4: Select the BERT preprocessing module
A preprocessing model must be selected based on the chosen Bert model. For this example, we are using the model ending with A-2.
bert_model_name = 'small_bert/bert_en_uncased_L-2_H-128_A-2'
tfhub_handle_encoder = map_name_to_handle[bert_model_name]
tfhub_handle_preprocess = map_model_to_preprocess[bert_model_name]
print(f'BERT model selected : {tfhub_handle_encoder}')
print(f'Preprocess model auto-selected: {tfhub_handle_preprocess}')
The output displays the selected models.
BERT model selected : https://tfhub.dev/tensorflow/small_bert/bert_en_uncased_L-2_H-128_A-2/1
Preprocess model auto-selected: https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3