inet.package

Submodules

inet.helpers module

Common helper methods that are required in most sub-directories of the current directory

copy_model(input_model, layer_range: Tuple[int, int] = (0, - 1))[source]

Method to copy layer_range from a model into a new model instance.

Parameters
  • input_model – the model to copy

  • layer_range – the range of layers to copy from the input model

Returns

a new model having layer_range based on the input_model

extract_labels_and_features(dataset)[source]

Helper to extract labels and features from a given data set

Parameters

dataset – dataset to extract data from

Returns

tuple of features and labels

get_train_logdir(name: Optional[str] = None)[source]

Helper function to populate the current time into a given name

Example:
>>> get_train_logdir('foo')
'../train_logs/foo-run_2022_06_09-13-21-50'
Parameters

name – name prefix for the directory

Returns

generated directory name