def copy_state_dict(state_dict_1, state_dict_2):
    """Manual copy of state dict.
    Why ? Because when copying a state dict to another with load_state_dict, the values of weight are copied only
    when keys are the same in both state_dict, even if strict=False.
    """

    state1_keys = list(state_dict_1.keys())
    state2_keys = list(state_dict_2.keys())

    for x in range(len(state1_keys)):
        state_dict_2[state2_keys[x]] = state_dict_1[state1_keys[x]]

    return state_dict_2