""" def __init__(self, file=USER_CONFIG_DIR / 'settings.yaml', version="0.0.4"): """初始化SettingsManager,加载和验证当前设置。""" self.file = Path(file) self.version = version self.defaults = { "settings_version": version, "datasets_dir": str(ROOT / "datasets"), "weights_dir...
cuda.is_available() else "cpu" if __name__ == '__main__': # 确保该模块被直接运行时才执行以下代码 workers = 1 # 设置数据加载的工作进程数 batch = 2 # 设置每个批次的大小 data_name = "data" # 数据集名称 # 获取数据集yaml文件的绝对路径 data_path = abs_path(f'datasets/{data_name...