Question on labeling text for sentiment analysis

I’ve also been following @wgpubs whilst attempting the toxic comments challenge and have been enormously helped by their comments. I’m only a little ahead of you in the course and am no expert, but eventually managed to put a multiclass classifier together. Unfortunately I can’t get it to train! So much to learn still…

As I understand it, the only need for a custom classifier is to handle the various softmax / sigmoid layers for the different outputs in the original question. For toxic comments we just need softmax, so I only modified the original PoolingLinearClassifier slightly by adding softmax. Maybe I’m wrong, hopefully somebody will correct me if so.

I’ve put my custom classifier here in case it helps. Custom PLC Gist

Happy to share my whole notebook if you want as there’s a lot of custom code, but since it’s not training I don’t want to send someone else down the wrong path too…

1 Like

Thanks I looked at your gist and it is very interesting. However I don’t understand the pooling aspect. What do we need the pooling for? I probably haven’t gotten far enough in the course yet (I am now in the middle of lecture 5) so if you point me to the right lecture I will gladly take a look. Also I don’t understand the

for l in self.layers:
    l_x = l(x)
    x = F.relu(l_x)

Why are we applying those relus if we want a sigmoid at the end?

2 Likes