Solution:
You are passing a string value into the chr() function. This must work:
a=list(str(12345))
for q in a:
print(chr(int(q)))
#The above code will work but this will print out characters, as 1-5
# in the ASCII table are not visible characters.
a = [65,66,67,68,69]
for q in a:
print(chr(q))
At the time you did x = F.relu(self.lstm(inputs)) in your forward pass, you forgot to give the lstm with hidden and cell units.