Skip to content

lichingngamba/tweet_classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tweet_classification

Classification of Metaphorical Tweets by Fine-tunning DistilBert.

###########################################

loading and saving

Import the libraries

import torch from transformers import DistilBertModel

Specify the path or URL to the model file

PATH = "distilbert_model.pt"

Load the model's state_dict

state_dict = torch.load(PATH, map_location="cpu")

Create an instance of the model class

model = DistilBertModel.from_pretrained('distilbert-base-uncased')

Load the state_dict into the model

model.load_state_dict(state_dict)

Set the model to evaluation mode

model.eval()

About

Classification of Metaphorical Tweets using Fine-tuned DistilBert.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors