torch.nn.GRU 's input shape is [[sequence_size, batch_size, hidden_size]](https://pytorch.org/docs/stable/nn.html#torch.nn.GRU). But your code such as https://github.com/Nrgeup/controllable-text-attribute-transfer/blob/master/method/mymodel-yelp/model2.py#L315 is [batch_size, sequence_size, hidden_size]. I think your code is something wrong...
torch.nn.GRU 's input shape is [sequence_size, batch_size, hidden_size].
But your code such as https://github.com/Nrgeup/controllable-text-attribute-transfer/blob/master/method/mymodel-yelp/model2.py#L315
is [batch_size, sequence_size, hidden_size].
I think your code is something wrong...