DAPPER (Document Analysis, Processing, and Pattern Extraction Repository)
Statistical Learning Final Project for Document Classification
 
Loading...
Searching...
No Matches
models.BaseModel Class Reference
Collaboration diagram for models.BaseModel:
Collaboration graph

Public Member Functions

 __init__ (self, str model_name, int num_classes, bool pretrained=True)
 
torch.Tensor transform_image (self, Image.Image image)
 
torch.Tensor run_inference (self, torch.Tensor image)
 
nn.Module get_model (self)
 

Public Attributes

 model_name
 
 num_classes
 
 pretrained
 
 model
 
 transform
 

Constructor & Destructor Documentation

◆ __init__()

models.BaseModel.__init__ (   self,
str  model_name,
int  num_classes,
bool   pretrained = True 
)

Member Function Documentation

◆ get_model()

nn.Module models.BaseModel.get_model (   self)

◆ run_inference()

torch.Tensor models.BaseModel.run_inference (   self,
torch.Tensor  image 
)

◆ transform_image()

torch.Tensor models.BaseModel.transform_image (   self,
Image.Image  image 
)

Member Data Documentation

◆ model

models.BaseModel.model

◆ model_name

models.BaseModel.model_name

◆ num_classes

models.BaseModel.num_classes

◆ pretrained

models.BaseModel.pretrained

◆ transform

models.BaseModel.transform

The documentation for this class was generated from the following file: