new__training

This commit is contained in:
Dobromir Popov
2025-05-24 02:42:11 +03:00
parent b181d11923
commit ef71160282
10 changed files with 1613 additions and 190 deletions

View File

@ -114,6 +114,14 @@ class Config:
'logs': 'logs',
'cache': 'cache',
'plots': 'plots'
},
'training': {
'use_only_real_data': True,
'batch_size': 32,
'learning_rate': 0.001,
'epochs': 100,
'validation_split': 0.2,
'early_stopping_patience': 10
}
}
@ -188,6 +196,18 @@ class Config:
"""Get file paths"""
return self._config.get('paths', {})
@property
def training(self) -> Dict[str, Any]:
"""Training configuration"""
return {
'use_only_real_data': True,
'batch_size': self._config.get('training', {}).get('batch_size', 32),
'learning_rate': self._config.get('training', {}).get('learning_rate', 0.001),
'epochs': self._config.get('training', {}).get('epochs', 100),
'validation_split': self._config.get('training', {}).get('validation_split', 0.2),
'early_stopping_patience': self._config.get('training', {}).get('early_stopping_patience', 10)
}
def get(self, key: str, default: Any = None) -> Any:
"""Get configuration value by key with optional default"""
return self._config.get(key, default)