File size: 611 Bytes
81a5d0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from pathlib import Path

DATASETS = ["cifar10", "cifar100", "ImageNet16-120"]
DEVICES = ["edgegpu", "eyeriss", "fpga"]

def get_project_root(): 
    """
    Returns project root directory from this script nested in the commons folder.
    """
    return Path(__file__).parent.parent

def union_of_dicts(dicts):
    """
    Returns a dictionary that represents the union of all input dictionaries.

    Parameters:
    - dicts (iterable): An iterable of dictionaries.

    Returns:
    - dict: The union of all dictionaries.
    """
    result = {}
    for d in dicts:
        result.update(d)
    return result