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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Kolam AI Generator Configuration
|
| 2 |
+
|
| 3 |
+
# Data Configuration
|
| 4 |
+
data:
|
| 5 |
+
input_channels: 1 # Grayscale images
|
| 6 |
+
image_size: 64 # Target image size
|
| 7 |
+
batch_size: 32
|
| 8 |
+
num_workers: 4
|
| 9 |
+
train_ratio: 0.8
|
| 10 |
+
val_ratio: 0.1
|
| 11 |
+
test_ratio: 0.1
|
| 12 |
+
|
| 13 |
+
# Model Configuration
|
| 14 |
+
models:
|
| 15 |
+
# CNN Feature Extractor
|
| 16 |
+
cnn:
|
| 17 |
+
feature_dim: 128
|
| 18 |
+
num_classes: 10
|
| 19 |
+
learning_rate: 0.001
|
| 20 |
+
weight_decay: 1e-4
|
| 21 |
+
lr_step_size: 30
|
| 22 |
+
lr_gamma: 0.1
|
| 23 |
+
|
| 24 |
+
# GAN Configuration
|
| 25 |
+
gan:
|
| 26 |
+
noise_dim: 100
|
| 27 |
+
feature_dim: 128
|
| 28 |
+
output_channels: 1
|
| 29 |
+
image_size: 64
|
| 30 |
+
use_spectral_norm: true
|
| 31 |
+
|
| 32 |
+
# Generator
|
| 33 |
+
generator:
|
| 34 |
+
learning_rate: 0.0002
|
| 35 |
+
beta1: 0.5
|
| 36 |
+
beta2: 0.999
|
| 37 |
+
|
| 38 |
+
# Discriminator
|
| 39 |
+
discriminator:
|
| 40 |
+
learning_rate: 0.0002
|
| 41 |
+
beta1: 0.5
|
| 42 |
+
beta2: 0.999
|
| 43 |
+
n_critic: 1 # Number of discriminator updates per generator update
|
| 44 |
+
|
| 45 |
+
# Training Configuration
|
| 46 |
+
training:
|
| 47 |
+
epochs: 200
|
| 48 |
+
save_interval: 50
|
| 49 |
+
sample_interval: 10
|
| 50 |
+
checkpoint_dir: "models/checkpoints"
|
| 51 |
+
|
| 52 |
+
# Early stopping
|
| 53 |
+
early_stopping:
|
| 54 |
+
patience: 20
|
| 55 |
+
min_delta: 0.001
|
| 56 |
+
|
| 57 |
+
# Gradient clipping
|
| 58 |
+
gradient_clipping:
|
| 59 |
+
enabled: true
|
| 60 |
+
max_norm: 1.0
|
| 61 |
+
|
| 62 |
+
# Data Augmentation
|
| 63 |
+
augmentation:
|
| 64 |
+
enabled: true
|
| 65 |
+
transforms:
|
| 66 |
+
- "random_horizontal_flip"
|
| 67 |
+
- "random_rotation"
|
| 68 |
+
- "random_brightness"
|
| 69 |
+
- "random_contrast"
|
| 70 |
+
|
| 71 |
+
# Parameters
|
| 72 |
+
rotation_degrees: 15
|
| 73 |
+
brightness_factor: 0.2
|
| 74 |
+
contrast_factor: 0.2
|
| 75 |
+
|
| 76 |
+
# Evaluation Configuration
|
| 77 |
+
evaluation:
|
| 78 |
+
num_samples: 1000
|
| 79 |
+
metrics:
|
| 80 |
+
- "inception_score"
|
| 81 |
+
- "fid_score"
|
| 82 |
+
- "diversity"
|
| 83 |
+
- "sharpness"
|
| 84 |
+
- "symmetry"
|
| 85 |
+
- "complexity"
|
| 86 |
+
- "balance"
|
| 87 |
+
- "rhythm"
|
| 88 |
+
|
| 89 |
+
# Generation Configuration
|
| 90 |
+
generation:
|
| 91 |
+
num_samples: 16
|
| 92 |
+
save_samples: true
|
| 93 |
+
sample_format: "png"
|
| 94 |
+
sample_quality: 95
|
| 95 |
+
|
| 96 |
+
# Variations
|
| 97 |
+
variations:
|
| 98 |
+
geometric_transforms:
|
| 99 |
+
- "flip_h"
|
| 100 |
+
- "flip_v"
|
| 101 |
+
- "rotate_90"
|
| 102 |
+
- "rotate_180"
|
| 103 |
+
- "rotate_270"
|
| 104 |
+
|
| 105 |
+
style_variations:
|
| 106 |
+
- "enhance_contrast"
|
| 107 |
+
- "enhance_brightness"
|
| 108 |
+
- "enhance_sharpness"
|
| 109 |
+
|
| 110 |
+
color_variations:
|
| 111 |
+
- "grayscale"
|
| 112 |
+
- "inverted"
|
| 113 |
+
- "sepia"
|
| 114 |
+
|
| 115 |
+
# Paths Configuration
|
| 116 |
+
paths:
|
| 117 |
+
data_dir: "data"
|
| 118 |
+
raw_data_dir: "data/raw"
|
| 119 |
+
processed_data_dir: "data/processed"
|
| 120 |
+
generated_data_dir: "data/generated"
|
| 121 |
+
model_dir: "models"
|
| 122 |
+
checkpoint_dir: "models/checkpoints"
|
| 123 |
+
output_dir: "outputs"
|
| 124 |
+
logs_dir: "logs"
|
| 125 |
+
|
| 126 |
+
# Logging Configuration
|
| 127 |
+
logging:
|
| 128 |
+
level: "INFO"
|
| 129 |
+
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
| 130 |
+
file: "logs/training.log"
|
| 131 |
+
console: true
|
| 132 |
+
|
| 133 |
+
# Hardware Configuration
|
| 134 |
+
hardware:
|
| 135 |
+
device: "auto" # auto, cpu, cuda
|
| 136 |
+
mixed_precision: false
|
| 137 |
+
num_gpus: 1
|
| 138 |
+
|
| 139 |
+
# Reproducibility
|
| 140 |
+
reproducibility:
|
| 141 |
+
seed: 42
|
| 142 |
+
deterministic: true
|
| 143 |
+
benchmark: false
|
| 144 |
+
|
| 145 |
+
# Advanced Configuration
|
| 146 |
+
advanced:
|
| 147 |
+
# Feature extraction
|
| 148 |
+
feature_extraction:
|
| 149 |
+
pretrained: false
|
| 150 |
+
freeze_backbone: false
|
| 151 |
+
|
| 152 |
+
# GAN training
|
| 153 |
+
gan_training:
|
| 154 |
+
label_smoothing: 0.1
|
| 155 |
+
feature_matching: false
|
| 156 |
+
gradient_penalty: false
|
| 157 |
+
penalty_weight: 10.0
|
| 158 |
+
|
| 159 |
+
# Model architecture
|
| 160 |
+
architecture:
|
| 161 |
+
# Generator
|
| 162 |
+
generator:
|
| 163 |
+
use_self_attention: false
|
| 164 |
+
use_spectral_norm: true
|
| 165 |
+
dropout_rate: 0.0
|
| 166 |
+
|
| 167 |
+
# Discriminator
|
| 168 |
+
discriminator:
|
| 169 |
+
use_self_attention: false
|
| 170 |
+
use_spectral_norm: true
|
| 171 |
+
dropout_rate: 0.0
|