module documentation

Undocumented

Function extract_from_meta Loads info from meta file with path _fp_ with the keys and transformers in _keys_
Function extract_from_path Undocumented
Function get_2d_zeropadding Helper function to determine the amount of padding for obtaining same-size pooling and conv (see modules.py for help)
Function get_datapath Undocumented
Function GrandparentRegexpSplitter Split `items` from the grandparent folder names matching the regexp's (`train_regexp` and `valid_regexp`).
Function load_history Undocumented
Function print_sizes Print shape of layer for each layer in Sequential model
Function weight_initialisation Helper function to apply for initialising weights of the networks
def extract_from_meta(fp, keys): (source)

Loads info from meta file with path _fp_ with the keys and transformers in _keys_

Parameters
fppath to the meta file
keysa dict(), key is the line-identifier, value is functions to convert rest of the line to the desired value if value is a list, the list will be applied to the line
Returns
def extract_from_path(path, key, default=None, split_char='_'): (source)

Undocumented

def get_2d_zeropadding(x): (source)

Helper function to determine the amount of padding for obtaining same-size pooling and conv (see modules.py for help)

Goes through x (e.g. kernel-sizes) backwards

Parameters
x
Returns
def get_datapath(folder, mode, bw): (source)

Undocumented

def GrandparentRegexpSplitter(train_regexp='train', valid_regexp='valid'): (source)

Split `items` from the grandparent folder names matching the regexp's (`train_regexp` and `valid_regexp`).

Parameters
train_regexp
valid_regexp
Returns
Function for splitting items into train and validation
def load_history(model_output_folder): (source)

Undocumented

def print_sizes(model, input_tensor): (source)

Print shape of layer for each layer in Sequential model

def weight_initialisation(m, func=nn.init.xavier_normal_): (source)

Helper function to apply for initialising weights of the networks

Parameters
mModel
funcFunction use for initialisation, takes Tensor, returns Tensor of same size
Returns