Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
PPC-BSC
Software
Deep Health Compss
Commits
7eb504af
Commit
7eb504af
authored
Jan 24, 2022
by
salbiach
Browse files
start_time moved to just training
parent
2959589c
Changes
13
Show whitespace changes
Inline
Side-by-side
docker/pyeddl/eddl_compss_distributed.py
View file @
7eb504af
...
...
@@ -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
):
...
...
docker/pyeddl/eddl_train_batch_compss_mnist_async.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/eddl_train_batch_compss_mnist_sync.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar100_lenet_async.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar100_lenet_sync.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_lenet_async.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_lenet_sync.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_lenet_sync_test.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_vgg16_async.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_vgg16_seq.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_cifar10_vgg16_sync.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_mnist_async.py
View file @
7eb504af
...
...
@@ -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
)
...
...
docker/pyeddl/examples/eddl_train_batch_compss_mnist_sync.py
View file @
7eb504af
...
...
@@ -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_
C
PU
(),
eddl
.
CS_
G
PU
(),
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment