aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/api/api/Models/Model.cs2
-rw-r--r--backend/api/api/Services/IModelService.cs1
-rw-r--r--backend/api/api/Services/ModelService.cs10
3 files changed, 13 insertions, 0 deletions
diff --git a/backend/api/api/Models/Model.cs b/backend/api/api/Models/Model.cs
index 7c884ae9..5678daaf 100644
--- a/backend/api/api/Models/Model.cs
+++ b/backend/api/api/Models/Model.cs
@@ -36,6 +36,8 @@ namespace api.Models
public int hiddenLayerNeurons { get; set; }
public int hiddenLayers { get; set; }
public int batchSize { get; set; }
+ // na izlazu je moguce da bude vise neurona (klasifikacioni problem sa vise od 2 klase)
+ public int outputNeurons { get; set; }
public string inputLayerActivationFunction { get; set; }
public string hiddenLayerActivationFunction { get; set; }
public string outputLayerActivationFunction { get; set; }
diff --git a/backend/api/api/Services/IModelService.cs b/backend/api/api/Services/IModelService.cs
index 887be4ae..ee5c279f 100644
--- a/backend/api/api/Services/IModelService.cs
+++ b/backend/api/api/Services/IModelService.cs
@@ -7,6 +7,7 @@ namespace api.Services
{
Model GetOneModel(string username, string name);
List<Model> GetMyModels(string username);
+ List<Model> GetLatestModels(string username);
//List<Model> GetPublicModels();
Model Create(Model model);
void Update(string username, string name, Model model);
diff --git a/backend/api/api/Services/ModelService.cs b/backend/api/api/Services/ModelService.cs
index 3d5c3b3e..f42219f5 100644
--- a/backend/api/api/Services/ModelService.cs
+++ b/backend/api/api/Services/ModelService.cs
@@ -30,6 +30,15 @@ namespace api.Services
{
return _model.Find(model => model.username == username).ToList();
}
+ public List<Model> GetLatestModels(string username)
+ {
+ List<Model> list = _model.Find(model => model.username == username).ToList();
+
+ list = list.OrderByDescending(model => model.lastUpdated).ToList();
+
+ return list;
+ }
+
/*
public List<Model> GetPublicModels()
{
@@ -56,6 +65,7 @@ namespace api.Services
return true;
return false;
}
+
}
}