utils

Generic utils for traverse_nn.

Functions

find_layer

Return the first layer of the given type(s) contained in a model.

find_layers

Return all layers of the given type(s) contained in a model.

get_output_dim

Return the output feature dimension of a model.

layer_finder

Collect visited objects that are instances of LAYER_TYPES into FOUND_LAYERS.