first code commi. First protoyp for AIIA Config

This commit is contained in:
Falko Victor Habel 2025-01-09 21:53:44 +01:00
parent d37124219c
commit 7287ba543f
2 changed files with 30 additions and 0 deletions

0
src/aiia/__init__.py Normal file
View File

30
src/aiia/model/config.py Normal file
View File

@ -0,0 +1,30 @@
import json
class AIIAConfig:
def __init__(
self,
model_name: str = "AIIA",
radius: int = 3,
activation_function: str = "gelu",
hidden_size: int = 128,
num_hidden_layers: int = 2,
num_channels: int = 3,
):
self.model_name = model_name
self.radius = radius
self.activation_function = activation_function
self.hidden_size = hidden_size
self.num_hidden_layers = num_hidden_layers
self.num_channels = num_channels
def save(self, file_path):
# Save config to JSON
with open(file_path, 'w') as f:
json.dump(self.__dict__, f)
@classmethod
def load(cls, file_path):
# Load config from JSON
with open(file_path, 'r') as f:
config_dict = json.load(f)
return cls(**config_dict)