:py:mod:`mlair.model_modules.inception_model` ============================================= .. py:module:: mlair.model_modules.inception_model Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: mlair.model_modules.inception_model.InceptionModelBase Attributes ~~~~~~~~~~ .. autoapisummary:: mlair.model_modules.inception_model.__author__ mlair.model_modules.inception_model.__date__ mlair.model_modules.inception_model.conv_settings_dict .. py:data:: __author__ :annotation: = Felix Kleinert, Lukas Leufen .. py:data:: __date__ :annotation: = 2019-10-22 .. py:class:: InceptionModelBase This class contains all necessary construction blocks .. py:method:: block_part_name(self) Use unicode due to some issues of keras with normal strings :return: .. py:method:: batch_normalisation(self, input_x, **kwargs) .. py:method:: create_conv_tower(self, input_x, reduction_filter, tower_filter, tower_kernel, activation='relu', batch_normalisation=False, **kwargs) This function creates a "convolution tower block" containing a 1x1 convolution to reduce filter size followed by convolution with given filter and kernel size :param input_x: Input to network part :param reduction_filter: Number of filters used in 1x1 convolution to reduce overall filter size before conv. :param tower_filter: Number of filters for n x m convolution :param tower_kernel: kernel size for convolution (n,m) :param activation: activation function for convolution :param batch_normalisation: :return: .. py:method:: act(self, input_x, activation, **act_settings) .. py:method:: _get_act_name(act_name) :staticmethod: .. py:method:: create_pool_tower(self, input_x, pool_kernel, tower_filter, activation='relu', max_pooling=True, **kwargs) This function creates a "MaxPooling tower block" :param input_x: Input to network part :param pool_kernel: size of pooling kernel :param tower_filter: Number of filters used in 1x1 convolution to reduce filter size :param activation: :param max_pooling: :return: .. py:method:: inception_block(self, input_x, tower_conv_parts, tower_pool_parts, **kwargs) Crate a inception block :param input_x: Input to block :param tower_conv_parts: dict containing settings for parts of inception block; Example: tower_conv_parts = {'tower_1': {'reduction_filter': 32, 'tower_filter': 64, 'tower_kernel': (3, 1), 'activation' : 'relu', 'padding' : 'SymPad2D'} 'tower_2': {'reduction_filter': 32, 'tower_filter': 64, 'tower_kernel': (5, 1), 'activation' : LeakyReLU, 'padding' : keras.layers.ZeroPadding2D} 'tower_3': {'reduction_filter': 32, 'tower_filter': 64, 'tower_kernel': (1, 1), 'activation' : ELU, 'padding' : src.model_modules.advanced_paddings.ReflectionPadding2D} } :param tower_pool_parts: dict containing settings for pool part of inception block; Example: tower_pool_parts = {'pool_kernel': (3, 1), 'tower_filter': 64, 'padding': 'RefPad2D'} :return: .. py:data:: conv_settings_dict