Mercurial > repos > bgruening > sklearn_svm_classifier
diff keras_deep_learning.py @ 18:aa5170605077 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author | bgruening |
---|---|
date | Tue, 13 Apr 2021 16:02:45 +0000 |
parents | 2bbf0b17deab |
children | 6b557c954b0d |
line wrap: on
line diff
--- a/keras_deep_learning.py Wed Mar 11 17:00:51 2020 +0000 +++ b/keras_deep_learning.py Tue Apr 13 16:02:45 2021 +0000 @@ -177,11 +177,11 @@ # merge layers if 'merging_layers' in options: idxs = literal_eval(options.pop('merging_layers')) - merging_layers = [all_layers[i-1] for i in idxs] + merging_layers = [all_layers[i - 1] for i in idxs] new_layer = klass(**options)(merging_layers) # non-input layers elif inbound_nodes is not None: - new_layer = klass(**options)(all_layers[inbound_nodes-1]) + new_layer = klass(**options)(all_layers[inbound_nodes - 1]) # input layers else: new_layer = klass(**options) @@ -189,10 +189,10 @@ all_layers.append(new_layer) input_indexes = _handle_shape(config['input_layers']) - input_layers = [all_layers[i-1] for i in input_indexes] + input_layers = [all_layers[i - 1] for i in input_indexes] output_indexes = _handle_shape(config['output_layers']) - output_layers = [all_layers[i-1] for i in output_indexes] + output_layers = [all_layers[i - 1] for i in output_indexes] return Model(inputs=input_layers, outputs=output_layers) @@ -300,8 +300,7 @@ options.update((inputs['mode_selection']['compile_params'] ['optimizer_selection']['optimizer_options'])) - train_metrics = (inputs['mode_selection']['compile_params'] - ['metrics']).split(',') + train_metrics = inputs['mode_selection']['compile_params']['metrics'] if train_metrics[-1] == 'none': train_metrics = train_metrics[:-1] options['metrics'] = train_metrics