new__training
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user