Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implement a simple Transformer neural network that is composed of the following layers: * Use BERT as feature extractor for each token. * A few
Implement a simple Transformer neural network that is composed of the following layers:
Use BERT as feature extractor for each token.
A few of transformer encoder layers, hidden dimension You need to determine how many layers to use between ~
A few of transformer decoder layers, hidden dimension You need to determine how many layers to use between ~
hidden layer with size
The final output layer with one cell for binary classification to predict whether two inputs are related or not.
Note that each input for this model should be a concatenation of a positive pair ie question one answer or a negative pair ie question not related sentence The format is usually like CLS question SEP a positivenegative sentence.
Train the model with the training data, use the devtest set to determine a good size of the transformer layers, and report the final results using the test set. Again, remember to use the test set only after you have determined the optimal parameters of the transformer layers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started