Commit 7eb504af authored by salbiach's avatar salbiach
Browse files

start_time moved to just training

parent 2959589c
......@@ -16,7 +16,7 @@ class Eddl_Compss_Distributed:
def __init__(self):
self.model = None
#@constraint(computing_units="${OMP_NUM_THREADS}")
@constraint(computing_units="${OMP_NUM_THREADS}")
@task(serialized_model=IN, optimizer=IN, losses=IN, metrics=IN, compserv=IN, is_replicated=True)
def build(self, serialized_model, optimizer, losses, metrics, compserv):
......@@ -42,7 +42,7 @@ class Eddl_Compss_Distributed:
#print("Finaliza build task en worker")
#@constraint(computing_units="${OMP_NUM_THREADS}")
@constraint(computing_units="${OMP_NUM_THREADS}")
@task(
x_train={Type: COLLECTION_IN, Depth: 2},
y_train={Type: COLLECTION_IN, Depth: 2},
......@@ -195,7 +195,7 @@ class Eddl_Compss_Distributed:
return final_parameters
#@constraint(computing_units="${OMP_NUM_THREADS}")
@constraint(computing_units="${OMP_NUM_THREADS}")
@task(accumulated_parameters=COMMUTATIVE, parameters_to_aggregate=IN, mult_factor=IN, target_direction=IN)
def aggregate_parameters_async(self, accumulated_parameters, parameters_to_aggregate, mult_factor):
......@@ -207,7 +207,7 @@ class Eddl_Compss_Distributed:
return accumulated_parameters
#@constraint(computing_units="${OMP_NUM_THREADS}")
@constraint(computing_units="${OMP_NUM_THREADS}")
@task(initial_parameters=IN, train_test_flag=IN, target_direction=IN)
def evaluate(self, initial_parameters, train_test_flag):
......@@ -249,7 +249,7 @@ class Eddl_Compss_Distributed:
return 1
#@constraint(computing_units="${OMP_NUM_THREADS}")
@constraint(computing_units="${OMP_NUM_THREADS}")
@task(initial_parameters=IN, x_test={Type: COLLECTION_IN, Depth: 2}, y_test={Type: COLLECTION_IN, Depth: 2}, num_images_per_worker=IN, workers_batch_size=IN, target_direction=IN)
def eval_batch(self, x_test, y_test, initial_parameters, num_images_per_worker, workers_batch_size):
......
......@@ -20,7 +20,6 @@ def main(args):
#eddl.download_mnist()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
......@@ -68,6 +67,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("Model training...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -20,7 +20,6 @@ def main(args):
#eddl.download_mnist()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
......@@ -65,6 +64,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -24,8 +24,6 @@ def main(args):
#download_cifar100_npy()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -62,6 +60,7 @@ def main(args):
x_text = apply(eddlT.div_, x_test, 255.0)
# Model training
start_time = timer()
print("Model training...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -27,8 +27,6 @@ def main(args):
#download_cifar100_npy()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -65,6 +63,7 @@ def main(args):
x_text = apply(eddlT.div_, x_test, 255.0)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -22,8 +22,6 @@ def main(args):
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -63,6 +61,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("Model training...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -24,9 +24,6 @@ def main(args):
#print("E: ", platform.uname())
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -66,6 +63,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -21,8 +21,6 @@ def main(args):
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -62,6 +60,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -23,8 +23,6 @@ def main(args):
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -63,6 +61,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("Model training...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -19,8 +19,6 @@ def main(args):
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -54,6 +52,7 @@ def main(args):
eddlT.div_(x_test, 255.0)
# Model training
start_time = timer()
print("Model training...")
print("Number of epochs: ", num_epochs)
print("Number of epochs for parameter syncronization: ", num_epochs_for_param_sync)
......
......@@ -21,8 +21,6 @@ def main(args):
#eddl.download_cifar10()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
workers_batch_size = args.workers_batch_size
......@@ -61,6 +59,7 @@ def main(args):
eddlT.div_(x_test, 255.0)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -20,7 +20,6 @@ def main(args):
#eddl.download_mnist()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
......@@ -68,6 +67,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("Model training...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
......@@ -20,7 +20,6 @@ def main(args):
#eddl.download_mnist()
start_time = timer()
num_workers = args.num_workers
num_epochs = args.num_epochs
......@@ -45,7 +44,7 @@ def main(args):
eddl.sgd(CVAR_SGD1, CVAR_SGD2),
["soft_cross_entropy"],
["categorical_accuracy"],
eddl.CS_CPU(),
eddl.CS_GPU(),
True
)
......@@ -65,6 +64,7 @@ def main(args):
y_train_dist = array(y_train, train_images_per_worker)
# Model training
start_time = timer()
print("MODEL TRAINING...")
print("Num workers: ", num_workers)
print("Number of epochs: ", num_epochs)
......
Markdown is supported
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