Commit 1d612262 authored by Lukas Wolf's avatar Lukas Wolf
Browse files

functionality for ensemble retraining

parent 006f064a
......@@ -6,6 +6,8 @@ from Clusters.cluster import clustering as clustering
from Clusters.cluster2 import clustering as clustering2
from Clusters.cluster3 import clustering as clustering3
from keras.utils.generic_utils import get_custom_objects
config = dict()
##################################################################
......@@ -46,6 +48,7 @@ Cluster can be set to clustering(), clustering2() or clustering3(), where differ
config['gaze-reg'] = True # Set to False if you want to run the saccade classification task
config['prosaccade'] = False
config['calibration-task'] = False
config['angle-pred']
# Choose how much data to use on gaze-reg
config['data-fraction'] = 1.0 # Set to 1.0 if you want to use the whole dataset, experimental feature only for regression task \
......@@ -85,6 +88,7 @@ config['plot_model'] = True
if (config['data_mode'] == 'fix_sacc_fix' or config['data_mode'] == 'calib_task_fix_sacc_fix') and config['gaze-reg']:
from utils.losses import angle_loss
config['loss'] = angle_loss
get_custom_objects().update({"angle_loss": angle_loss})
else:
config['loss'] = 'mean_squared_error'
......
import tensorflow as tf
from tensorflow import keras
path = "net_scratch/projects/dl-project/runs/1617890104_cnn_gaze-reg_fix_sacc_fix/"
model = keras.models.load_model(path + "cnn_best_model.h5")
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment