Text-Classification-Models-Pytorch icon indicating copy to clipboard operation
Text-Classification-Models-Pytorch copied to clipboard

Use of permute in RCNN

Open jtquisenberry opened this issue 4 years ago • 0 comments

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?

jtquisenberry avatar Jan 04 '21 23:01 jtquisenberry