Answered step by step
Verified Expert Solution
Link Copied!

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 768. You need to determine how many layers to use between 1~3.
* A few of transformer decoder layers, hidden dimension 768. You need to determine how many layers to use between 1~3.
*1 hidden layer with size 512.
* 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 (i.e. question + one answer) or a negative pair (i.e. question + not related sentence). The format is usually like [CLS]+ question +[SEP]+ a positive/negative sentence.
Train the model with the training data, use the dev_test 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

What is the median loan amount?

Answered: 1 week ago

Question

What is the total loan amount?

Answered: 1 week ago