deep_bottleneck package



deep_bottleneck.artifact_viewer module

class deep_bottleneck.artifact_viewer.Artifact(name, file)[source]

Bases: object

Displays or saves an artifact.

extension = ''
class deep_bottleneck.artifact_viewer.ArtifactLoader(mongo_uri='mongodb://<MONGO_INITDB_ROOT_USERNAME>:<MONGO_INITDB_ROOT_PASSWORD>@<server_ip_address>:27017/?authMechanism=SCRAM-SHA-1', db_name='<MONGO_DATABASE>')[source]

Bases: object

Loads artifacts related to experiments.

class deep_bottleneck.artifact_viewer.CSVArtifact(name, file)[source]

Bases: deep_bottleneck.artifact_viewer.Artifact

Displays and saves a CSV artifact

extension = 'csv'
class deep_bottleneck.artifact_viewer.MP4Artifact(name, file)[source]

Bases: deep_bottleneck.artifact_viewer.Artifact

Displays or saves a MP4 artifact

extension = 'mp4'
class deep_bottleneck.artifact_viewer.PNGArtifact(name, file)[source]

Bases: deep_bottleneck.artifact_viewer.Artifact

Displays or saves a PNG artifact.

extension = 'png'
show(figsize=(10, 10))[source]

deep_bottleneck.run_experiments module

This script can be used to submit several experiments to the grid.

All the experiments need to be specified as seperate JSON or yml files.


Recursively walk through the config dir and submit all experiment configurations in there to the grid.

deep_bottleneck.utils module

deep_bottleneck.utils.construct_full_dataset(training, test)[source]

Concatenates training and test data splits to obtain the full dataset.

The input arguments use the following naming convention:
  • X is the training data
  • y is training class, with numbers from 0 to 1
  • Y is training class, but coded as a 2-dim vector with one entry set to 1 at the column index corresponding to the class
  • training – Namedtuple with fields X, y and Y:
  • test – Namedtuple with fields X, y and Y:

A new Namedtuple with fields X, y and Y containing the concatenation of training and test data

deep_bottleneck.utils.data_shuffle(data_sets_org, percent_of_train, min_test_data=80, shuffle_data=False)[source]

Divided the data to train and test and shuffle it

deep_bottleneck.utils.get_min_max(activations_summary, layer_number, neuron_number=None)[source]

Get minimum and maximum of activations of a specific layer or a specific neuron over all epochs :param activations_summary: numpy ndarray :param layer_number: Index of the layer :param neuron_number: Index of the neuron. If None, activations of the whole layer serve as a basis

Returns:Minimum and maximum value of activations over all epochs

Check whether a layer has attribute ‘kernel’, which is true for dense-like layers :param layer: Keras layer to check for attribute ‘kernel’

Returns:True if layer has attribute ‘kernel’, False otherwise
deep_bottleneck.utils.shuffle_in_unison_inplace(a, b)[source]

Shuffles both array a and b randomly in unison :param a: An Array, for example containing data samples :param b: An Array, fpor example containing labels

Returns:Both arrays shuffled in the same way

Module contents