This error is raised by a dtype mismatch in the input and the parameters of the model.
I guess your input tensor might be a DoubleTensor, since it seems you are creating it from numpy arrays, which use float64 as the default dtype.
If that’s the case, transform it to a FloatTensor via input = input.float() before passing it to the model.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.