My code was working with 0.4, but later when switching to 1.0, the following bug occurs. Is there any quick fix here?

TypeError: lstm() received an invalid combination of arguments - got (Tensor, Tensor, tuple, list, bool, int, float, bool, int), but expected one of:

- (Tensor data, Tensor batch_sizes, tuple of Tensors hx, tuple of Tensors params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional)

didn’t match because some of the arguments have invalid types: (Tensor, Tensor, tuple, list, bool, int, float, bool, int) - (Tensor input, tuple of Tensors hx, tuple of Tensors params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first)

didn’t match because some of the arguments have invalid types: (Tensor, Tensor, tuple, list, bool, int, float, bool, int)