TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/utils/common.py
def _call_new_layers_sequentially(parent_layers: typing.List[tf.keras.layers.Layer],
                                  new_layers: typing.List[tf.keras.layers.Layer]) -> tf.Tensor:
    """
    Call new layers sequentially to create nodes, starting from parent layers.
    :param parent_layers: Parent layers to start building new nodes from
    :param new_layers: New layers to be called sequentially
    :return: Output tensor from final new layer
    """
    # pylint: disable=protected-access
    # Use output tensors from parent layers to create new nodes
    # Assumption is that the order in which keras inputs showed up is the same order to call into new layers.
    curr_tensor = []
    for parent_layer in parent_layers:
        curr_tensor.append(parent_layer.output)

    # Flatten inputs if there is only one
    if len(curr_tensor) == 1:
        curr_tensor = curr_tensor[0]

    for layer in new_layers:
        curr_tensor = layer(curr_tensor)
    return curr_tensor

    Call new layers sequentially to create nodes, starting from parent layers.
    :param parent_layers: Parent layers to start building new nodes from
    :param new_layers: New layers to be called sequentially
    :return: Output tensor from final new layer
    
Call new layers sequentially to create nodes, starting from parent layers.
Call new layers sequentially to create nodes starting from parent layers .
def _call_new_layers_sequentially(parent_layers: typing.List[tf.keras.layers.Layer],
                                  new_layers: typing.List[tf.keras.layers.Layer]) -> tf.Tensor:
    curr_tensor = []
    for parent_layer in parent_layers:
        curr_tensor.append(parent_layer.output)
    if len(curr_tensor) == 1:
        curr_tensor = curr_tensor[0]
    for layer in new_layers:
        curr_tensor = layer(curr_tensor)
    return curr_tensor
def _call_new_layers_sequentially ( parent_layers : typing . List [ tf . keras . layers . Layer ] , new_layers : typing . List [ tf . keras . layers . Layer ] ) -> tf . Tensor : curr_tensor = [ ] for parent_layer in parent_layers : curr_tensor . append ( parent_layer . output ) if len ( curr_tensor ) == 1 : curr_tensor = curr_tensor [ 0 ] for layer in new_layers : curr_tensor = layer ( curr_tensor ) return curr_tensor
Call new layers sequentially to create nodes, starting from parent layers.
Call new layers sequentially to create nodes starting from parent layers .
"""
    Call new layers sequentially to create nodes, starting from parent layers.
    :param parent_layers: Parent layers to start building new nodes from
    :param new_layers: New layers to be called sequentially
    :return: Output tensor from final new layer
    """ # pylint: disable=protected-access # Use output tensors from parent layers to create new nodes # Assumption is that the order in which keras inputs showed up is the same order to call into new layers. # Flatten inputs if there is only one
Output tensor from final new layer
Output tensor from final new layer
parent_layers
typing.List[tf.keras.layers.Layer]
Parent layers to start building new nodes from
Parent layers to start building new nodes from
new_layers
typing.List[tf.keras.layers.Layer]
New layers to be called sequentially
New layers to be called sequentially