How to interpret IMDB sentiment predictions?

Okay, I’ll try to work on it later too. Or maybe someone else will get to it.

I still didn’t get the ordering to work. I trust that your method works as you say. Do you see anything wrong with my code?

full gist


Summary

nlp.py

    trn_iter,val_iter,test_iter = torchtext.data.BucketIterator.splits(splits, batch_sizes=(bs, bs, 1))

in my notebook:

md2 = TextData.from_splits(PATH, splits, 1) #setting all bs to 1, just for making predictions
m3 = md2.get_model(opt_fn, 1500, bptt, emb_sz=em_sz, n_hid=nh, n_layers=nl, 
           dropouti=dropouti, dropout=dropout, wdrop=wdrop,
                       dropoute=dropoute, dropouth=dropouth)
m3.reg_fn = partial(seq2seq_reg, alpha=2, beta=1)
m3.load_encoder(f'h2_adam1_enc')
m3.load_cycle('h1',3)
val_preds,y = m3.predict_with_targs()

res = np.argmax(val_preds,axis=1)