utility_functions.py
def create_model_list():
    
    """
    Function creates a list of names of pre-trained models from 
    torchvision.models. Only the models are included which have 
    pre-trained versions. Trained version of "Inception" and "Squeezenet" 
    not included because of different / more complicated input / output 
    treatments (-> tu be added in the future ;-).
    
    Parameters:
     None
    Returns:
     model_list - list with pre-trained models from torchvision.models.
    """
        
    # Set start index (only include relevant attributes)
    start_idx = 0 
    
    # Return a list of valid attributes of the object 'models'
    model_list = dir(models)
    
    # Only use relevant list entries (here: start to end - all included)
    model_list = model_list[start_idx:]
    
    # Specifiy a list with terms that should be dropped from model list
    drop_list = ['densenet', 'inception', 'resnet', 'squeezenet', 'vgg',
                 'AlexNet', 'DenseNet', 'Inception3', 'ResNet', 'SqueezeNet', 'VGG',
                 '__builtins__', '__cached__', '__doc__', '__file__', '__loader__',
                 '__name__', '__package__', '__path__', '__spec__', 'inception_v3', 
                 'squeezenet1_1', 'squeezenet1_0' ]
    
    # Loop over the drop_list and remove items from the model list
    for drop in drop_list:
        if drop in model_list:
            model_list.remove(drop)
    
    # Return the final model list
    return model_list

    Function creates a list of names of pre-trained models from 
    torchvision.models. Only the models are included which have 
    pre-trained versions. Trained version of "Inception" and "Squeezenet" 
    not included because of different / more complicated input / output 
    treatments (-> tu be added in the future ;-).
    
    Parameters:
     None
    Returns:
     model_list - list with pre-trained models from torchvision.models.
    
Function creates a list of names of pre-trained models from
torchvision.models. Only the models are included which have
pre-trained versions. Trained version of "Inception" and "Squeezenet"
not included because of different / more complicated input / output
treatments (-> tu be added in the future ;-).

None
Returns:
model_list - list with pre-trained models from torchvision.models.
Function creates a list of names of pre - trained models from torchvision . models . Only the models are included which have pre - trained versions . Trained version of " Inception " and " Squeezenet " not included because of different / more complicated input / output treatments ( - > tu be added in the future ; - ) . None Returns : model_list - list with pre - trained models from torchvision . models .
def create_model_list():
    start_idx = 0 
    model_list = dir(models)
    model_list = model_list[start_idx:]
    drop_list = ['densenet', 'inception', 'resnet', 'squeezenet', 'vgg',
                 'AlexNet', 'DenseNet', 'Inception3', 'ResNet', 'SqueezeNet', 'VGG',
                 '__builtins__', '__cached__', '__doc__', '__file__', '__loader__',
                 '__name__', '__package__', '__path__', '__spec__', 'inception_v3', 
                 'squeezenet1_1', 'squeezenet1_0' ]
    for drop in drop_list:
        if drop in model_list:
            model_list.remove(drop)
    return model_list
def create_model_list ( ) : start_idx = 0 model_list = dir ( models ) model_list = model_list [ start_idx : ] drop_list = [ 'densenet' , 'inception' , 'resnet' , 'squeezenet' , 'vgg' , 'AlexNet' , 'DenseNet' , 'Inception3' , 'ResNet' , 'SqueezeNet' , 'VGG' , '__builtins__' , '__cached__' , '__doc__' , '__file__' , '__loader__' , '__name__' , '__package__' , '__path__' , '__spec__' , 'inception_v3' , 'squeezenet1_1' , 'squeezenet1_0' ] for drop in drop_list : if drop in model_list : model_list . remove ( drop ) return model_list
Function creates a list of names of pre-trained models from
torchvision.models.
Function creates a list of names of pre - trained models from torchvision . models .
"""
    Function creates a list of names of pre-trained models from 
    torchvision.models. Only the models are included which have 
    pre-trained versions. Trained version of "Inception" and "Squeezenet" 
    not included because of different / more complicated input / output 
    treatments (-> tu be added in the future ;-).
    
    Parameters:
     None
    Returns:
     model_list - list with pre-trained models from torchvision.models.
    """ # Set start index (only include relevant attributes) # Return a list of valid attributes of the object 'models' # Only use relevant list entries (here: start to end - all included) # Specifiy a list with terms that should be dropped from model list # Loop over the drop_list and remove items from the model list # Return the final model list