This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from collections import OrderedDict | |
from typing import List | |
checkpoints_weights_paths: List[str] = ... # sorted in descending order by score | |
model: torch.nn.Module = ... | |
def average_weights(state_dicts: List[dict]): | |
everage_dict = OrderedDict() |