Mercurial > repos > bgruening > keras_model_config
view keras_model_config.xml @ 7:2d8478144bb2 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9e28f4466084464d38d3f8db2aff07974be4ba69"
author | bgruening |
---|---|
date | Wed, 11 Mar 2020 13:50:11 -0400 |
parents | 0fd7d8e90e2a |
children | 4471d2b2de79 |
line wrap: on
line source
<tool id="keras_model_config" name="Create a deep learning model architecture" version="@KERAS_VERSION@"> <description>using Keras</description> <macros> <import>main_macros.xml</import> <import>keras_macros.xml</import> </macros> <expand macro="python_requirements"/> <expand macro="macro_stdio"/> <version_command>echo "@KERAS_VERSION@"</version_command> <command> <![CDATA[ python '$__tool_directory__/keras_deep_learning.py' --inputs '$inputs' --tool_id 'keras_model_config' --outfile '$outfile' ]]> </command> <configfiles> <inputs name="inputs"/> </configfiles> <inputs> <conditional name="model_selection"> <param name="model_type" type="select" label="Select keras model type"> <option value="sequential" selected="true">Sequential</option> <option value="functional">Model (functional API)</option> </param> <when value="sequential"> <param argument="input_shape" type="text" value="(32, )" optional="true" label="input_shape" help="Tuple of integers or None. Required for the first layer."/> <repeat name="layers" min="1" max="500" title="LAYER"> <conditional name="layer_selection"> <param name="layer_type" type="select" label="Choose the type of layer"> <expand macro="keras_layer_types_core"/> <expand macro="keras_layer_types_Convolutional"/> <expand macro="keras_layer_types_Pooling"/> <expand macro="keras_layer_types_locally_connected"/> <expand macro="keras_layer_types_recurrent"/> <expand macro="keras_layer_types_embedding"/> <expand macro="keras_layer_types_advanced_activations"/> <expand macro="keras_layer_types_normalization"/> <expand macro="keras_layer_types_noise"/> </param> <when value="Dense"> <expand macro="layer_Dense"/> </when> <when value="Activation"> <expand macro="keras_activations"/> </when> <when value="Dropout"> <expand macro="layer_Dropout"/> </when> <when value="Flatten"> <expand macro="layer_Flatten"/> </when> <when value="Reshape"> <expand macro="layer_Reshape"/> </when> <when value="Permute"> <expand macro="layer_Permute"/> </when> <when value="RepeatVector"> <expand macro="layer_RepeatVector"/> </when> <when value="ActivityRegularization"> <expand macro="layer_ActivityRegularization"/> </when> <when value="Masking"> <expand macro="layer_Masking"/> </when> <when value="SpatialDropout1D"> <expand macro="layer_SpatialDropout1D"/> </when> <when value="SpatialDropout2D"> <expand macro="layer_SpatialDropout2D"/> </when> <when value="SpatialDropout3D"> <expand macro="layer_SpatialDropout3D"/> </when> <when value="Conv1D"> <expand macro="layer_Conv1D"/> </when> <when value="Conv2D"> <expand macro="layer_Conv2D"/> </when> <when value="SeparableConv1D"> <expand macro="layer_SeparableConv1D"/> </when> <when value="SeparableConv2D"> <expand macro="layer_SeparableConv2D"/> </when> <when value="DepthwiseConv2D"> <expand macro="layer_DepthwiseConv2D"/> </when> <when value="Conv2DTranspose"> <expand macro="layer_Conv2DTranspose"/> </when> <when value="Conv3D"> <expand macro="layer_Conv3D"/> </when> <when value="Conv3DTranspose"> <expand macro="layer_Conv3DTranspose"/> </when> <when value="Cropping1D"> <expand macro="layer_Cropping1D"/> </when> <when value="Cropping2D"> <expand macro="layer_Cropping2D"/> </when> <when value="Cropping3D"> <expand macro="layer_Cropping3D"/> </when> <when value="UpSampling1D"> <expand macro="layer_UpSampling1D"/> </when> <when value="UpSampling2D"> <expand macro="layer_UpSampling2D"/> </when> <when value="UpSampling3D"> <expand macro="layer_UpSampling3D"/> </when> <when value="ZeroPadding1D"> <expand macro="layer_ZeroPadding1D"/> </when> <when value="ZeroPadding2D"> <expand macro="layer_ZeroPadding2D"/> </when> <when value="ZeroPadding3D"> <expand macro="layer_ZeroPadding3D"/> </when> <when value="MaxPooling1D"> <expand macro="layer_MaxPooling1D"/> </when> <when value="MaxPooling2D"> <expand macro="layer_MaxPooling2D"/> </when> <when value="MaxPooling3D"> <expand macro="layer_MaxPooling3D"/> </when> <when value="AveragePooling1D"> <expand macro="layer_AveragePooling1D"/> </when> <when value="AveragePooling2D"> <expand macro="layer_AveragePooling2D"/> </when> <when value="AveragePooling3D"> <expand macro="layer_AveragePooling3D"/> </when> <when value="GlobalMaxPooling1D"> <expand macro="layer_GlobalMaxPooling1D"/> </when> <when value="GlobalAveragePooling1D"> <expand macro="layer_GlobalAveragePooling1D"/> </when> <when value="GlobalMaxPooling2D"> <expand macro="layer_GlobalMaxPooling2D"/> </when> <when value="GlobalAveragePooling2D"> <expand macro="layer_GlobalAveragePooling2D"/> </when> <when value="GlobalMaxPooling3D"> <expand macro="layer_GlobalMaxPooling3D"/> </when> <when value="GlobalAveragePooling3D"> <expand macro="layer_GlobalAveragePooling3D"/> </when> <when value="LocallyConnected1D"> <expand macro="layer_LocallyConnected1D"/> </when> <when value="LocallyConnected2D"> <expand macro="layer_LocallyConnected2D"/> </when> <when value="SimpleRNN"> <expand macro="layer_SimpleRNN"/> </when> <when value="GRU"> <expand macro="layer_GRU"/> </when> <when value="LSTM"> <expand macro="layer_LSTM"/> </when> <when value="ConvLSTM2D"> <expand macro="layer_ConvLSTM2D"/> </when> <when value="ConvLSTM2DCell"> <expand macro="layer_ConvLSTM2DCell"/> </when> <when value="SimpleRNNCell"> <expand macro="layer_SimpleRNNCell"/> </when> <when value="GRUCell"> <expand macro="layer_GRUCell"/> </when> <when value="LSTMCell"> <expand macro="layer_LSTMCell"/> </when> <when value="CuDNNGRU"> <expand macro="layer_CuDNNGRU"/> </when> <when value="CuDNNLSTM"> <expand macro="layer_CuDNNLSTM"/> </when> <when value="Embedding"> <expand macro="layer_Embedding"/> </when> <when value="LeakyReLU"> <expand macro="layer_LeakyReLU"/> </when> <when value="PReLU"> <expand macro="layer_PReLU"/> </when> <when value="ELU"> <expand macro="layer_ELU"/> </when> <when value="ThresholdedReLU"> <expand macro="layer_ThresholdedReLU"/> </when> <when value="Softmax"> <expand macro="layer_Softmax"/> </when> <when value="ReLU"> <expand macro="layer_ReLU"/> </when> <when value="BatchNormalization"> <expand macro="layer_BatchNormalization"/> </when> <when value="GaussianNoise"> <expand macro="layer_GaussianNoise"/> </when> <when value="GaussianDropout"> <expand macro="layer_GaussianDropout"/> </when> <when value="AlphaDropout"> <expand macro="layer_AlphaDropout"/> </when> </conditional> </repeat> </when> <when value="functional"> <repeat name="layers" min="1" max="500" title="LAYER"> <conditional name="layer_selection"> <param name="layer_type" type="select" label="Choose the type of layer"> <option value="Input">Input</option> <expand macro="keras_layer_types_core"/> <expand macro="keras_layer_types_Convolutional"/> <expand macro="keras_layer_types_Pooling"/> <expand macro="keras_layer_types_locally_connected"/> <expand macro="keras_layer_types_recurrent"/> <expand macro="keras_layer_types_merge"/> <expand macro="keras_layer_types_embedding"/> <expand macro="keras_layer_types_advanced_activations"/> <expand macro="keras_layer_types_normalization"/> <expand macro="keras_layer_types_noise"/> </param> <when value="Input"> <expand macro="layer_Input"/> </when> <when value="Dense"> <expand macro="layer_Dense"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Activation"> <expand macro="keras_activations"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Dropout"> <expand macro="layer_Dropout"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Flatten"> <expand macro="layer_Flatten"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Reshape"> <expand macro="layer_Reshape"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Permute"> <expand macro="layer_Permute"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="RepeatVector"> <expand macro="layer_RepeatVector"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ActivityRegularization"> <expand macro="layer_ActivityRegularization"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Masking"> <expand macro="layer_Masking"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SpatialDropout1D"> <expand macro="layer_SpatialDropout1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SpatialDropout2D"> <expand macro="layer_SpatialDropout2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SpatialDropout3D"> <expand macro="layer_SpatialDropout3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Conv1D"> <expand macro="layer_Conv1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Conv2D"> <expand macro="layer_Conv2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SeparableConv1D"> <expand macro="layer_SeparableConv1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SeparableConv2D"> <expand macro="layer_SeparableConv2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="DepthwiseConv2D"> <expand macro="layer_DepthwiseConv2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Conv2DTranspose"> <expand macro="layer_Conv2DTranspose"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Conv3D"> <expand macro="layer_Conv3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Conv3DTranspose"> <expand macro="layer_Conv3DTranspose"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Cropping1D"> <expand macro="layer_Cropping1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Cropping2D"> <expand macro="layer_Cropping2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Cropping3D"> <expand macro="layer_Cropping3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="UpSampling1D"> <expand macro="layer_UpSampling1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="UpSampling2D"> <expand macro="layer_UpSampling2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="UpSampling3D"> <expand macro="layer_UpSampling3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ZeroPadding1D"> <expand macro="layer_ZeroPadding1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ZeroPadding2D"> <expand macro="layer_ZeroPadding2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ZeroPadding3D"> <expand macro="layer_ZeroPadding3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="MaxPooling1D"> <expand macro="layer_MaxPooling1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="MaxPooling2D"> <expand macro="layer_MaxPooling2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="MaxPooling3D"> <expand macro="layer_MaxPooling3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="AveragePooling1D"> <expand macro="layer_AveragePooling1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="AveragePooling2D"> <expand macro="layer_AveragePooling2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="AveragePooling3D"> <expand macro="layer_AveragePooling3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalMaxPooling1D"> <expand macro="layer_GlobalMaxPooling1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalAveragePooling1D"> <expand macro="layer_GlobalAveragePooling1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalMaxPooling2D"> <expand macro="layer_GlobalMaxPooling2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalAveragePooling2D"> <expand macro="layer_GlobalAveragePooling2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalMaxPooling3D"> <expand macro="layer_GlobalMaxPooling3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GlobalAveragePooling3D"> <expand macro="layer_GlobalAveragePooling3D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="LocallyConnected1D"> <expand macro="layer_LocallyConnected1D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="LocallyConnected2D"> <expand macro="layer_LocallyConnected2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SimpleRNN"> <expand macro="layer_SimpleRNN"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GRU"> <expand macro="layer_GRU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="LSTM"> <expand macro="layer_LSTM"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ConvLSTM2D"> <expand macro="layer_ConvLSTM2D"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ConvLSTM2DCell"> <expand macro="layer_ConvLSTM2DCell"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="SimpleRNNCell"> <expand macro="layer_SimpleRNNCell"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GRUCell"> <expand macro="layer_GRUCell"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="LSTMCell"> <expand macro="layer_LSTMCell"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="CuDNNGRU"> <expand macro="layer_CuDNNGRU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="CuDNNLSTM"> <expand macro="layer_CuDNNLSTM"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Add"> <expand macro="layer_merge"/> </when> <when value="Subtract"> <expand macro="layer_merge"/> </when> <when value="Multiply"> <expand macro="layer_merge"/> </when> <when value="Average"> <expand macro="layer_merge"/> </when> <when value="Maximum"> <expand macro="layer_merge"/> </when> <when value="Minimum"> <expand macro="layer_merge"/> </when> <when value="Concatenate"> <expand macro="layer_Concatenate"/> </when> <when value="Dot"> <expand macro="layer_Dot"/> </when> <when value="Embedding"> <expand macro="layer_Embedding"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="LeakyReLU"> <expand macro="layer_LeakyReLU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="PReLU"> <expand macro="layer_PReLU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ELU"> <expand macro="layer_ELU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ThresholdedReLU"> <expand macro="layer_ThresholdedReLU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="Softmax"> <expand macro="layer_Softmax"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="ReLU"> <expand macro="layer_ReLU"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="BatchNormalization"> <expand macro="layer_BatchNormalization"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GaussianNoise"> <expand macro="layer_GaussianNoise"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="GaussianDropout"> <expand macro="layer_GaussianDropout"> <expand macro="inbound_nodes_index"/> </expand> </when> <when value="AlphaDropout"> <expand macro="layer_AlphaDropout"> <expand macro="inbound_nodes_index"/> </expand> </when> </conditional> </repeat> <param name="input_layers" type="text" value="[]" label="Type the list of input layer indexes" help="List of integers. Find index number at the left top corner of layer configuration block."> <sanitizer> <valid initial="default"> <add value="["/> <add value="]"/> </valid> </sanitizer> </param> <param name="output_layers" type="text" value="[]" label="Type the list of output layer indexes" help="List of integers. Find index number at the left top corner of layer configuration block."> <sanitizer> <valid initial="default"> <add value="["/> <add value="]"/> </valid> </sanitizer> </param> </when> </conditional> </inputs> <outputs> <data format="json" name="outfile" label="Keras Model Config"/> </outputs> <tests> <test> <conditional name="model_selection"> <param name="model_type" value="sequential"/> <param name="input_shape" value="(784, )"/> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="32"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Activation"/> <param name="activation" value="relu"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="10"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Activation"/> <param name="activation" value="softmax"/> </conditional> </repeat> </conditional> <output name="outfile" file="keras01.json"/> </test> <test> <conditional name="model_selection"> <param name="model_type" value="functional"/> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Input"/> <param name="shape" value="(100, )" /> <param name="name" value="main_input"/> <param name="dtype" value="int32"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Embedding"/> <param name="input_dim" value="10000"/> <param name="output_dim" value="512"/> <param name="kwargs" value="input_length=100"/> <param name="inbound_nodes" value="1"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="LSTM"/> <param name="units" value="32"/> <param name="inbound_nodes" value="2"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="1"/> <param name="activation" value="sigmoid"/> <param name="inbound_nodes" value="3"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Input"/> <param name="shape" value="(5, )" /> <param name="name" value="aux_input"/> <param name="dtype" value="float32"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Concatenate"/> <param name="merging_layers" value="[4, 5]"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="64"/> <param name="activation" value="relu"/> <param name="inbound_nodes" value="6"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="64"/> <param name="activation" value="relu"/> <param name="inbound_nodes" value="7"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="64"/> <param name="activation" value="relu"/> <param name="inbound_nodes" value="8"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="1"/> <param name="activation" value="sigmoid"/> <param name="inbound_nodes" value="9"/> </conditional> </repeat> <param name="input_layers" value="[1, 5]"/> <param name="output_layers" value="[4, 10]"/> </conditional> <output name="outfile" file="keras02.json"/> </test> <test> <conditional name="model_selection"> <param name="model_type" value="sequential"/> <param name="input_shape" value="(17, )"/> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="32"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Activation"/> <param name="activation" value="linear"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Dense"/> <param name="units" value="1"/> </conditional> </repeat> <repeat name="layers"> <conditional name="layer_selection"> <param name="layer_type" value="Activation"/> <param name="activation" value="linear"/> </conditional> </repeat> </conditional> <output name="outfile" file="keras04.json"/> </test> </tests> <help> <![CDATA[ **Help** **What it does** Creates a deep learning architecture using Keras deep learning library by adding different types of layers in a sequential manner. Different types of layers include Dense, Dropout, Convolutional, Activation and so on. These layers are added one after another which generates a deep architecture. Moreover, it also offers functional API (where layers are callable and can be chained) for advanced users to create complex models. **Return** A JSON file containing the information of all the layers and their respective attributes. **How to create an architecture using this tool?** 1. Choose the model type. For example - "Sequential". It means that all the layers will be linearly stacked. 2. Add "Input shape" value. This is the dimensionality (number of columns) of the dataset excluding the 'target' or 'label' column. 3. Add layers using "Insert layer" button. Choose the layers and attributes (using advanced options) suited to the dataset. For example - Choose 'Dense' for adding a dense layer to the architecture and insert an integer under "Units" which are the number of neurons for this layer. Higher the number of units, the stronger is the architecture. Please be noted that the higher values of units may lead to overfitting and lower values may lead to underfitting. This is one of the hyperparameters of the architecture which needs to be tuned for a dataset. 4. Execute the tool to get a JSON string of the architecture. ]]> </help> <citations> <expand macro="keras_citation"/> <expand macro="tensorflow_citation"/> </citations> </tool>