TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/utils/common.py
def _get_following_layers_and_inputs(model: tf.keras.Model, layer: tf.keras.layers.Layer) -> \
        typing.Dict[tf.keras.layers.Layer, typing.List]:
    """
    Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer.
    :param model: Model containing layer
    :param layer: Layer to get following layers for
    :return: Dictionary mapping following layers of the given layer to the keras inputs for the following layer
    """
    # pylint: disable=protected-access
    following_layers_and_inputs = {}
    if layer.outbound_nodes:
        for outbound_node in layer.outbound_nodes:
            following_layer = outbound_node.outbound_layer
            following_layers_and_inputs[following_layer] = []
            # Find all inputs of following_layer, of which the old layer will be one
            for keras_input in outbound_node.keras_inputs:
                following_layers_and_inputs[following_layer].append(keras_input)
    else:
        assert layer in model._output_layers
    return following_layers_and_inputs

    Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer.
    :param model: Model containing layer
    :param layer: Layer to get following layers for
    :return: Dictionary mapping following layers of the given layer to the keras inputs for the following layer
    
Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer.
Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer .
def _get_following_layers_and_inputs(model: tf.keras.Model, layer: tf.keras.layers.Layer) -> \
        typing.Dict[tf.keras.layers.Layer, typing.List]:
    following_layers_and_inputs = {}
    if layer.outbound_nodes:
        for outbound_node in layer.outbound_nodes:
            following_layer = outbound_node.outbound_layer
            following_layers_and_inputs[following_layer] = []
            for keras_input in outbound_node.keras_inputs:
                following_layers_and_inputs[following_layer].append(keras_input)
    else:
        assert layer in model._output_layers
    return following_layers_and_inputs
def _get_following_layers_and_inputs ( model : tf . keras . Model , layer : tf . keras . layers . Layer ) -> typing . Dict [ tf . keras . layers . Layer , typing . List ] : following_layers_and_inputs = { } if layer . outbound_nodes : for outbound_node in layer . outbound_nodes : following_layer = outbound_node . outbound_layer following_layers_and_inputs [ following_layer ] = [ ] for keras_input in outbound_node . keras_inputs : following_layers_and_inputs [ following_layer ] . append ( keras_input ) else : assert layer in model . _output_layers return following_layers_and_inputs
Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer.
Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer .
"""
    Get a dictionary mapping following layers of the given layer to the keras inputs for the following layer.
    :param model: Model containing layer
    :param layer: Layer to get following layers for
    :return: Dictionary mapping following layers of the given layer to the keras inputs for the following layer
    """ # pylint: disable=protected-access # Find all inputs of following_layer, of which the old layer will be one
Dictionary mapping following layers of the given layer to the keras inputs for the following layer
Dictionary mapping following layers of the given layer to the keras inputs for the following layer
model
tf.keras.Model
Model containing layer
Model containing layer
layer
tf.keras.layers.Layer
Layer to get following layers for
Layer to get following layers for