The error message sounds a bit weird as apparently it’s being thrown while trying to create some internal tensors using the hidden_size and input_size for the shape definition.
Anyway, try to pass the input_size as a single value and it should work.