NebulOS / src /utils.py
fracapuano
add files via upload
81a5d0a
raw
history blame
No virus
611 Bytes
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