Closed AFanaei closed 3 years ago
i managed to find the problem.
it was because the output size of pooling layer was not matching the number of categories in data set. (i was running the note book with my own dataset)
after changing the number of output the problem was fixed .
emb_sz, nh, nl = 100, 100, 1
dps = tensor([0.4, 0.3, 0.4, 0.05, 0.5]) * 0.25
tok_pad = vocab.index(PAD)
n_out = len(proc_cat.vocab)
model = get_text_classifier(len(vocab), emb_sz, nh, nl, n_out , tok_pad, bptt, *dps)
when running the 12c_ulmfit notebook for training a classifier i got the following error:
it will fail no matter using pretraining or not.