Is it a right implement for rnn model?

I find a implement of rnn model,but the “forward” is not the normal format,there are there parameters for “forward” function.I wonder is it a right implement of rnn model?
the link:https://github.com/zhangxu0307/time_series_forecasting_pytorch/blob/master/code/model.py