Text-Classification-Models-Pytorch
Text-Classification-Models-Pytorch copied to clipboard
Use of permute in RCNN
On lines 53 and 61 of Text-Classification-Models-Pytorch/Model_RCNN/model.py , function permute is used.
input_features = torch.cat([lstm_out,embedded_sent], 2).permute(1,0,2)
...
linear_output = linear_output.permute(0,2,1) # Reshaping fot max_pool
Could you please explain why it is necessary or useful to permute the dimensions of these tensors?