def _load_embedding_serialized(self, pretrained_file_path):
deserialized_embedding = TokenEmbedding.deserialize(pretrained_file_path)<EOL>if deserialized_embedding.unknown_token:<EOL><INDENT>if deserialized_embedding.unknown_token:<EOL><INDENT>idx_to_token = deserialized_embedding.idx_to_token<EOL>idx_to_vec = deserialized_embedding.idx_to_vec<EOL>idx_to_token[C.UNK_IDX] = self.unknown_token<EOL>if self._init_unknown_vec:<EOL><INDENT>vec_len = idx_to_vec.shape[<NUM_LIT:1>]<EOL>idx_to_vec[C.UNK_IDX] = self._init_unknown_vec(shape=vec_len)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>assert C.UNK_IDX == <NUM_LIT:0><EOL>idx_to_token = deserialized_embedding.idx_to_token[C.UNK_IDX + <NUM_LIT:1>:]<EOL>idx_to_vec = deserialized_embedding.idx_to_vec[C.UNK_IDX + <NUM_LIT:1>:]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>idx_to_token = deserialized_embedding.idx_to_token<EOL>idx_to_vec = deserialized_embedding.idx_to_vec<EOL><DEDENT>if not len(set(idx_to_token)) == len(idx_to_token):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if self.unknown_token:<EOL><INDENT>try:<EOL><INDENT>unknown_token_idx = deserialized_embedding.idx_to_token.index(<EOL>self.unknown_token)<EOL>idx_to_token[C.UNK_IDX], idx_to_token[<EOL>unknown_token_idx] = idx_to_token[<EOL>unknown_token_idx], idx_to_token[C.UNK_IDX]<EOL>idxs = [C.UNK_IDX, unknown_token_idx]<EOL>idx_to_vec[idxs] = idx_to_vec[idxs[::-<NUM_LIT:1>]]<EOL><DEDENT>except ValueError:<EOL><INDENT>vec_len = idx_to_vec.shape[<NUM_LIT:1>]<EOL>idx_to_token.insert(<NUM_LIT:0>, self.unknown_token)<EOL>idx_to_vec = nd.concat(<EOL>self._init_unknown_vec(shape=vec_len).reshape((<NUM_LIT:1>, -<NUM_LIT:1>)),<EOL>idx_to_vec, dim=<NUM_LIT:0>)<EOL><DEDENT><DEDENT>self._idx_to_token = idx_to_token<EOL>self._idx_to_vec = idx_to_vec<EOL>self._token_to_idx.update((token, idx) for idx, token in enumerate(self._idx_to_token))<EOL>
Load embedding vectors from a pre-trained token embedding file.

        For every unknown token, if its representation `self.unknown_token` is encountered in the
        pre-trained token embedding file, index 0 of `self.idx_to_vec` maps to the pre-trained token
        embedding vector loaded from the file; otherwise, index 0 of `self.idx_to_vec` maps to the
        text embedding vector initialized by `self._init_unknown_vec`.

        ValueError is raised if a token occurs multiple times.