Files
remote-sensing/train_land_svm_gpu.py
T

27 lines
786 B
Python

from train_module import train_model
def main():
print("🚀 BẮT ĐẦU HUẤN LUYỆN MÔ HÌNH SVM (GPU & CACHE)")
params = {
'bbox': [105.5, 9.2, 106.3, 10.0],
'time_range': '2023-01-01/2023-04-30',
'model_type': 'svm',
'feature_mode': 'extended',
'use_cache': True,
'use_gpu': True,
'output_model_path': 'land_classification_model/model_svm_auto.joblib'
}
try:
res = train_model(**params)
if res.get('success'):
print(f"✅ Hoàn thành! Accuracy: {res.get('test_accuracy', 0.0):.4f}")
else:
print(f"❌ Thất bại: {res.get('error', 'Unknown')}")
except Exception as e:
print(f"❌ Lỗi: {e}")
if __name__ == "__main__":
main()