Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # loading the tokenizer and vocab processors
- processor = get_roberta_processor(tokenizer=fastai_tokenizer, vocab=fastai_roberta_vocab)
- # creating our databunch
- data = ItemLists(".", RobertaTextList.from_df(train, ".", cols=feat_cols, processor=processor),
- RobertaTextList.from_df(val, ".", cols=feat_cols, processor=processor)
- ) \
- .label_from_df(cols=label_cols, label_cls=CategoryList) \
- .add_test(RobertaTextList.from_df(test, ".", cols=feat_cols, processor=processor)) \
- .databunch(bs=4,pad_first=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement