Session Ready
Exercise

Initialize the input and target vectors

In the previous exercise, you defined the input and target vectors with appropriate shape. In this exercise, you'll fill these vectors with data. You'll iterate over each character of each sentence and convert the character to a one-hot encoded vector.

The prefix and suffix sentences, the vocabulary, the character to integer and integer to character mappings are available in prefix_sentences, suffix_sentences, vocabulary, char_to_idx and idx_to_char respectively. The input vectors for the prefixes and suffixes and the target vector are available in input_data_prefix, input_data_suffix and target_data respectively.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Convert each character of each prefix to a one-hot encoded vector and save it in input_data_prefix.