If you try to use input_length=4 , it will throw an error saying it is not a valid keyword argument. Although, the same format has been mentioned in tensorflow documentation still it throw this error (Even if I try to reprdoduce the code mentioned in the documentaion).