AutoNN.CNN.cnn_generator.CNN
Parameters:
-
in_channels : The number of channels in an image
-
numClass : Total number of classes in a classification problem
-
config : Generated configuration by AutoNN's
CreateCNN.create_config()
method required to create a CNN model
Methods:
-
summary() :
Parameters:
input_shape : Shape of the image
torch.tensor
[C, H, W]where, C = number of channels H = height of the image W = width of the image
border :
bool datatype
, default =True
| It prints lines between layers while displaying the summary of a model if set toTrue
-
save()
classes :
List
of classesimage_shape :
Tuple[int, int]
(H,W) | dimension of the imagespath :
Optional
| path to the directory where the model is intended to be storedNote
For the very first time
path
should be included, otherwise it will throw anInvalidPathError
exception.filename :
str
| name of the model -
load()
Parameters:
PATH : Path to the trained
model.pth
.printmodel :
bool datatype
, default =False
| print the model if set toTrue
loadmodel :
bool datatype
, default =True
| loads all the stored weights if set toTrue
-
predict()
paths :
Union[list | tuple]
| list of unknown images for testing or prediction