Yufeng Ma
Yufeng Ma
I think this should be due to pytorch version change. At least we have a matrix of 30x review_len for the weights varialbe for each review. This is the weight...
vector = weights.sum( 0 ) vector = vector / vector.sum() att, ids_to_show = vector.sort( 0, descending=True ) Try this. It sums all the 30 attention weights and normalized.
I'm sorry that I didn't extract the features here in this version. The fc_features is actually the MLPhidden input to the final classifier. You may just extract this from https://github.com/yufengm/SelfAttentive/blob/406a1f2d5e62eebc7a4b995b68114fb4ea87f98f/model.py#L91...
I'm sorry that I just implement it in pytorch.
Did you validate or test on Flickr? I haven't looked at results at early epochs. Typically it converges at least after epoch 20.
Because I didn't implement the beam search, so there is still like 2point margin.
Please refer to https://github.com/yufengm/Adaptive/blob/4c0555af546cdbd49e99ff1bd6e91d1654ae0cd2/train.py#L152 for test on the validation dataset.
Not really. I haven't implemented the beam search part in the paper.
Thanks for your note. I've also spotted this before. But the preprocessing is just following the Karpathy's step, in which he just applied the nltk tokenizer. Hope this helps.