Content text [Exercise] CNN (1) (EN).docx
EXERCISE (CNN) PART 1: Named Entity Recognition (NER) Exercise 1: Representing sentences using embedding Sentence: "Nguyen Van X lives in Hanoi" Embedding (assuming each word has a 3d vector): ● Nguyen = [0.2, 0.4, 0.1] ● Van = [0.3, 0.5, 0.2] ● X = [0.6, 0.7, 0.3] ● live = [0.1, 0.8, 0.4] ● at = [0.5, 0.2, 0.6] ● Ha = [0.7, 0.3, 0.9] ● Internal = [0.8, 0.4, 0.7] Request: 1. Write the embedding matrix. 2. Determine the input size for the CNN. Solution: Embedding matrix: Size: (7 words × 3 dimensions). Exercise 2: Calculate convolution for word window Filter: 3 word size × 3 dimension Bias = 0.1, stride = 1. First window: [Nguyen, Van, X]