Views
No views yet
1model_state_dict = torch.load("review_classifier.pth", map_location=torch.device('cpu'))
2 model.load_state_dict(model_state_dict)
3text_1 = (
4 "I love to go to Waterloo university and summer break"
5 ""
6)
7print(classify_review(
8 text_1, model, tokenizer, device, max_length=train_dataset.max_length
9))