def set_fpn_weights(training_model, inference_model, verbose=False):
    """
    Set feature pyramid network (FPN) weights from training to inference graph
    Args:
        training_model:   MaskRCNN training graph, tf.keras.Model
        inference_model:  MaskRCNN inference graph, tf.keras.Model
        verbose:          Print layers that get weights, bool

    Returns: inference_model

    """
    fpn_layers = ['fpn_c5p5', 'fpn_c4p4', 'fpn_c3p3', 'fpn_c2p2',
                  'fpn_p5', 'fpn_p4', 'fpn_p3', 'fpn_p2',
                  ]
    for layer_name in fpn_layers:
        # Get weights from training graph
        layer_weights = training_model.get_layer(layer_name).get_weights()
        # Set weights in inference graph
        inference_model.get_layer(layer_name).set_weights(layer_weights)

        if verbose:
            print(f'Set weights: {layer_name}')

    return inference_model