# GTA-UAV Balanced (SOFIA v1 backbone): StripNet+DCNv4 hierarchical CNN
# (~3-30M params depending on variant) trained from scratch с двухуровневой
# text fusion:
#   1. Mid-level: Text-FiLM в SAT и UAV heads (модулирует [B,C,8,8] перед GGeM).
#   2. Late-level: GatedFusion на дескрипторах.
#
# UAV head: AltitudeFiLM(drone_height) + [TextFiLM] + GGeM + BN + Linear.
# SAT head: [TextFiLM] + GGeM + BN + Linear.
# Один backbone shared между sat/uav.
#
# Variant -> размер модели:
#   tiny_tiny: dims [16, 32, 80, 128]   (~0.4M)
#   tiny     : dims [32, 64, 128, 256]  (~1M)
#   small    : dims [64, 128, 320, 512] (~3M, default)
#   small_v2 : dims [64, 128, 256, 384] (~2M)
#
# Trainable (с small variant + text fusion):
#   - SOFIA v1 backbone (~3M) + heads (~0.6M)
#   - DGTRS-CLIP LoRA (rank=4, ~147K)
#   - TextFusionMLP (3*768 -> 1024 -> 1024, ~3.4M, shared)
#   - Gates α_q, α_g + learnable τ
# Total trainable ~7M.
#
# Note: DCNv4 требует CUDA — обучение только на GPU. Не работает на CPU.

include 'conf/gtauav_balanced.gin'

# ---- Backbone ----
TrainConfigGTAUAV.backbone = "sofia_v1"
TrainConfigGTAUAV.sofia_v1_variant = "tiny"
TrainConfigGTAUAV.sofia_v1_d_descriptor = 1024
TrainConfigGTAUAV.sofia_v1_use_text_film_uav = True
TrainConfigGTAUAV.sofia_v1_use_text_film_sat = True
TrainConfigGTAUAV.sofia_v1_use_film_altitude = True
TrainConfigGTAUAV.sofia_v1_lora_rank = 4

# ---- Training overrides ----
TrainConfigGTAUAV.gradient_checkpointing = False  # SOFIA v1 from-scratch
TrainConfigGTAUAV.shared_encoder = True

# ---- Output ----
TrainConfigGTAUAV.output_dir = "out/gtauav/with_text_sofia_v1"
