Skip to content

Commit

Permalink
- updated pipeline for tensorflow
Browse files Browse the repository at this point in the history
- added traiuning and inferece fro classificateion class for pytorch
- added parsing to ONNX
  • Loading branch information
nshepeleva committed Aug 13, 2019
1 parent 29d1a6f commit cad46e2
Show file tree
Hide file tree
Showing 17 changed files with 1,263 additions and 282 deletions.
18 changes: 9 additions & 9 deletions configs/config_ConvNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,24 @@ def load_config():
config = ConfigFlags().return_flags()

config.net = 'ConvNet'
config.training_mode = True
config.training_mode = False
config.data_set = 'MNIST'
config.image_size = [28, 28, 1]

config.lr = 0.001
config.lr_decay = 0.1
config.ref_steps = 10
config.ref_patience = 1
config.ref_steps = 3
config.ref_patience = 3
config.batch_size = 32
config.num_epochs = 1000
config.num_epochs = 3
config.loss = 'softmax'
config.optimizer = 'adam'
config.optimizer = 'sgd'
config.gradcam_record = True
config.gradcam_layers = 6
config.gradcam_layers_max = 6
config.mi_record = False
config.gpu_load = 0.8
config.num_classes = 10
config.class_labels = [i for i in range(9)]
config.class_labels = [str(i) for i in range(10)]
config.num_filters = 16
config.upconv = 'upconv'
config.nonlin = 'relu'
Expand All @@ -53,10 +52,11 @@ def load_config():
config.normalize = True
config.zero_center = True
config.dropout = 0.4
config.chpnt2load = ''
# config.chpnt2load = r'E:\SCCH_PROJECTS\DL_implementaitons\00_templates\training_engine_git\experiments\ckpnt_logs\MNIST\1565681155.1648371\1565681155.1648371_split_0'
config.chpnt2load = r'experiments/ckpnt_logs/MNIST/1565680688.729741/1565680688.729741_split_0'
config.multi_task = False
config.cross_val = 1
config.framework = 'tensorflow'
config.framework = 'pytorch'
config.experiment_path = None


Expand Down
86 changes: 86 additions & 0 deletions configs/config_ONNXtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (C) Software Competence Center Hagenberg GmbH (SCCH)
# All rights reserved.
# -----------------------------------------------------------------------------
# This document contains proprietary information belonging to SCCH.
# Passing on and copying of this document, use and communication of its
# contents is not permitted without prior written authorization.
# -----------------------------------------------------------------------------
# Created on : 5/9/2019 3:49 PM $
# by : Shepeleva $
# SVN $
#

# --- imports -----------------------------------------------------------------

#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (C) Software Competence Center Hagenberg GmbH (SCCH)
# All rights reserved.
# -----------------------------------------------------------------------------
# This document contains proprietary information belonging to SCCH.
# Passing on and copying of this document, use and communication of its
# contents is not permitted without prior written authorization.
# -----------------------------------------------------------------------------
# Created on : 3/21/2019 8:30 AM $
# by : Shepeleva $
# SVN $
#

# --- imports -----------------------------------------------------------------


from configs.config import ConfigFlags


def load_config():
config = ConfigFlags().return_flags()

config.net = r'E:\o156.onnx'

config.autotune = False
config.training_mode = True

config.data_set = 'CIFAR10'
config.image_size = [32, 32, 3]
config.data_folder = None
config.data_file = None


config.lr = 0.001
config.lr_decay = 0.1
config.ref_steps = 10
config.ref_patience = 10
config.batch_size = 128
config.num_epochs = 2
config.loss = 'softmax'
config.optimizer = 'sgd'
config.gradcam_record = True
config.gradcam_layers = 6
config.gradcam_layers_max = 6
config.mi_record = False
config.gpu_load = 0.8
config.num_classes = 10
config.class_labels = [i for i in range(9)]
config.num_filters = 64
config.upconv = 'upconv'
config.nonlin = 'relu'
config.task_type = 'classification'
config.accuracy = 'percent'
config.augmentation = {'flip_hor': False,
'flip_vert': False}
config.data_split = 0.7
config.long_summary = True
config.trainable_layers = 'all'
config.normalize = True
config.zero_center = True
config.dropout = 0.4
config.chpnt2load = ''
config.multi_task = False
config.cross_val = 1
config.framework = 'tensorflow'
config.experiment_path = None


return config
66 changes: 66 additions & 0 deletions configs/config_UNet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (C) Software Competence Center Hagenberg GmbH (SCCH)
# All rights reserved.
# -----------------------------------------------------------------------------
# This document contains proprietary information belonging to SCCH.
# Passing on and copying of this document, use and communication of its
# contents is not permitted without prior written authorization.
# -----------------------------------------------------------------------------
# Created on : 01/08/2018 16:29 $
# by : shepeleva $
# SVN : $
#

# --- imports -----------------------------------------------------------------

from configs.config import ConfigFlags


def load_config():
config = ConfigFlags().return_flags()

config.autotune = False

config.net = 'UNet'
config.training_mode = True
config.data_set = 'rubble_sample'
config.data_dir = r'F:\Datasets\Rubblemaster_segmentation'
config.image_size = [1024, 1024, 1]

config.lr = 0.001
config.lr_decay = 0.1
config.ref_steps = 3
config.ref_patience = 3
config.batch_size = 2
config.num_epochs = 100
config.loss = 'dice_jaccard'
config.optimizer = 'sgd'
config.gradcam_record = True
config.gradcam_layers = 6
config.gradcam_layers_max = 6
config.mi_record = False
config.gpu_load = 0.8
config.num_classes = 1
config.class_labels = [i for i in range(1)]
config.num_filters = 8
config.upconv = 'upconv'
config.nonlin = 'relu'
config.task_type = 'segmentation'
config.accuracy = 'IoU'
config.augmentation = {'flip_hor': False,
'flip_vert': False}
config.data_split = 0.7
config.long_summary = True
config.trainable_layers = 'all'
config.normalize = True
config.zero_center = True
config.dropout = 0.4
config.chpnt2load = ''
config.multi_task = False
config.cross_val = 1
config.framework = 'pytorch'
config.experiment_path = None


return config
70 changes: 70 additions & 0 deletions configs/config_VGG19.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (C) Software Competence Center Hagenberg GmbH (SCCH)
# All rights reserved.
# -----------------------------------------------------------------------------
# This document contains proprietary information belonging to SCCH.
# Passing on and copying of this document, use and communication of its
# contents is not permitted without prior written authorization.
# -----------------------------------------------------------------------------
# Created on : 3/21/2019 8:30 AM $
# by : Shepeleva $
# SVN $
#

# --- imports -----------------------------------------------------------------


from configs.config import ConfigFlags


def load_config():
config = ConfigFlags().return_flags()

config.net = 'VGG19'

config.autotune = False
config.training_mode = True

config.data_set = 'CIFAR10'
config.image_size = [32, 32, 3]
config.data_folder = None
config.data_file = None


config.lr = 0.001
config.lr_decay = 0.1
config.ref_steps = 10
config.ref_patience = 10
config.batch_size = 128
config.num_epochs = 2
config.loss = 'softmax'
config.optimizer = 'sgd'
config.gradcam_record = True
config.gradcam_layers = 6
config.gradcam_layers_max = 6
config.mi_record = False
config.gpu_load = 0.8
config.num_classes = 10
config.class_labels = [i for i in range(9)]
config.num_filters = 64
config.upconv = 'upconv'
config.nonlin = 'relu'
config.task_type = 'classification'
config.accuracy = 'percent'
config.augmentation = {'flip_hor': False,
'flip_vert': False}
config.data_split = 0.7
config.long_summary = True
config.trainable_layers = 'all'
config.normalize = True
config.zero_center = True
config.dropout = 0.4
config.chpnt2load = ''
config.multi_task = False
config.cross_val = 1
config.framework = 'tensorflow'
config.experiment_path = None


return config
3 changes: 1 addition & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

EXPERIMENT_ID = 'ConvNet'


def run(experiment_id):
config = importlib.import_module('configs.config_' + experiment_id)
args = config.load_config()
Expand All @@ -32,7 +31,7 @@ def run(experiment_id):
else:
inference = InferenceRunner(experiment_id=experiment_id)
inference.start_inference()
raise ValueError('Inference not implemented yet')
# raise ValueError('Inference not implemented yet')


if __name__ == '__main__':
Expand Down
Loading

0 comments on commit cad46e2

Please sign in to comment.