Text-Classification-Models-Pytorch
Text-Classification-Models-Pytorch copied to clipboard
Implementation of State-of-the-art Text Classification Models in Pytorch
Hi, thanks for your code! However, I think there might be a bug on NLLLoss: I think the input of nn.NLLloss() is after logsoftmax according to this manual: https://pytorch.org/docs/stable/generated/torch.nn.NLLLoss.html, however,...
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...
In fasttext model: def forward(self, x): embedded_sent = self.embeddings(x).permute(1,0,2) h = self.fc1(embedded_sent.mean(1)) z = self.fc2(h) return self.softmax(z) Why is there no call to relu on h?