# i am trying to one hot the inputs for the encoder and decoder layers in lstm? is this logical?

the follwoing code is a generator I am using to pass the training, for this generator i am passing questions and answers. the first 200 Q and A I am reserving for testing. The relevant part of the code is after the padding line for ans_pad and ques_pad. Should I also one hot this data. I am trying to build a chatbot, but so far I ma getting very poor results and I feel like the issue lies in this part. I one hoted the output data, is it logical to do the same for the input as well? I tried doing it but it led to errors in my input layer of the model

def generator(questions,answers, batch_size=32):
num_samples = len(questions)
while True:
for offset in range(200, num_samples, batch_size):
question_samples = questions[offset:offset+batch_size]
ques_train = []
ans_train = []
for i in question_samples:
ques_train.append(i)
for i in question_samples:
ans_train.append(i)
ques_train = np.array(ques_train)
ans_train = np.array(ans_train)