update number of clusters

This commit is contained in:
Lorenzo 2020-11-30 15:40:19 +01:00
parent 0dea7a2cdb
commit bee58a107b
3 changed files with 8 additions and 9 deletions

View File

@ -5,7 +5,6 @@ try:
from openpifpaf.network.nets import cli as openpifpaf_cli
except ImportError:
from openpifpaf.network.factory import cli as openpifpaf_cli
from openpifpaf.network import nets
from openpifpaf import decoder

View File

@ -59,7 +59,7 @@ class Trainer:
self.lr = lr
self.sched_step = sched_step
self.sched_gamma = sched_gamma
self.clusters = ['10', '20', '30', '50', '>50']
self.clusters = ['10', '20', '30', '40']
self.hidden_size = hidden_size
self.n_stage = n_stage
self.dir_out = dir_out

View File

@ -20,14 +20,14 @@ def append_cluster(dic_jo, phase, xx, ys, kps):
dic_jo[phase]['clst']['30']['kps'].append(kps)
dic_jo[phase]['clst']['30']['X'].append(xx)
dic_jo[phase]['clst']['30']['Y'].append(ys)
elif ys[3] < 50:
dic_jo[phase]['clst']['50']['kps'].append(kps)
dic_jo[phase]['clst']['50']['X'].append(xx)
dic_jo[phase]['clst']['50']['Y'].append(ys)
elif ys[3] <= 40:
dic_jo[phase]['clst']['40']['kps'].append(kps)
dic_jo[phase]['clst']['40']['X'].append(xx)
dic_jo[phase]['clst']['40']['Y'].append(ys)
else:
dic_jo[phase]['clst']['>50']['kps'].append(kps)
dic_jo[phase]['clst']['>50']['X'].append(xx)
dic_jo[phase]['clst']['>50']['Y'].append(ys)
dic_jo[phase]['clst']['>40']['kps'].append(kps)
dic_jo[phase]['clst']['>40']['X'].append(xx)
dic_jo[phase]['clst']['>40']['Y'].append(ys)
def get_task_error(dd):