basic_utils/utils.py
def merge_before_after(info_before, info_after):
    """
    Merge two dicts into one. This is used when updating network weights.
    We merge the update info before update and after update into one dict.

    Args:
        info_before: the dictionary containing the information before updating
        info_after: the dictionary containing the information after updating

    Return:
        info: the merged dictionary
    """
    info = OrderedDict()
    for k in info_before:
        info[k + '_before'] = info_before[k]
        info[k + '_after'] = info_after[k]
    return info

    Merge two dicts into one. This is used when updating network weights.
    We merge the update info before update and after update into one dict.

    Args:
        info_before: the dictionary containing the information before updating
        info_after: the dictionary containing the information after updating

    Return:
        info: the merged dictionary
    
Merge two dicts into one. This is used when updating network weights.
We merge the update info before update and after update into one dict.
Merge two dicts into one . This is used when updating network weights . We merge the update info before update and after update into one dict .
def merge_before_after(info_before, info_after):
    info = OrderedDict()
    for k in info_before:
        info[k + '_before'] = info_before[k]
        info[k + '_after'] = info_after[k]
    return info
def merge_before_after ( info_before , info_after ) : info = OrderedDict ( ) for k in info_before : info [ k + '_before' ] = info_before [ k ] info [ k + '_after' ] = info_after [ k ] return info
Merge two dicts into one.
Merge two dicts into one .
"""
    Merge two dicts into one. This is used when updating network weights.
    We merge the update info before update and after update into one dict.

    Args:
        info_before: the dictionary containing the information before updating
        info_after: the dictionary containing the information after updating

    Return:
        info: the merged dictionary
    """
info_before
the dictionary containing the information before updating
the dictionary containing the information before updating
info_after
the dictionary containing the information after updating
the dictionary containing the information after updating