Skip to content

Instantly share code, notes, and snippets.

View max-kuk's full-sized avatar
🎓
Focusing

Max Kukuškin max-kuk

🎓
Focusing
View GitHub Profile
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()