AutoNN.CNN.cnn_generator.CreateCNN
Parameters:
- _size :
int
| default =10
| Maximum number of CNN models to be generated
Methods:
create_config() :
This function will create configuration based on which CNN models will be generated.
Parameters:
min : int
| minimum number of layers the gnerated CNN model can have
max : int
| maximum number of layers the gnerated CNN model can have
Example
print_all_cnn_configs() :
This function will print all the CNN architectures in PyTorch Format
Parameters: None
print_all_architecture()
This function will print all the CNN architectures generated
Parameters: None
get_bestCNN()
Parameters:
path_trainset : str
| path to the image training set
path_testset : str
| Optional[str]
| path to the image test set
split_required : bool
| default = False
| set to true if only there is no test set
batch_size : int
| default = 16
| Batch size
lossFn : str
| default = cross-entropy
| Most multiclass image classification problems use CrossEntropyLoss
Info
Only Cross Entropy Loss
has been implemented. Since most image classification tasks uses cross entropy loss as the preferred loss function.
LR : float
| default = 3e4
| Learning Rate
EPOCHS : int
| default = 10
| number Epochs
image_shape : Tuple[int,int]
| default = (28,28)
| dimension of the input image from the training dataset
Returns :
Returns a tuple containing the best CNN model generated, its configuration, and history of all models generated
( best_CNN_model, best_model_config, history_of_all_models)