def concat_channels(inputs, name='', data_format='channels_first', debug_print=debug_print_others): axis = get_channel_index(inputs[0], data_format) outputs = tf.concat(inputs, axis=axis, name=name) if debug_print: print_shape_parameters(inputs, outputs, name, 'concat') return outputs
def flatten(inputs, name='', debug_print=debug_print_others): outputs = tf.layers.flatten(inputs, name) if debug_print: print_shape_parameters(inputs, outputs, name, 'flatten') return outputs
def mult(input0, input1, name='', debug_print=debug_print_others): outputs = tf.multiply(input0, input1, name=name) if debug_print: print_shape_parameters(input0, outputs, name, 'mult') return outputs
def add(inputs, name='', debug_print=debug_print_others): outputs = tf.add_n(inputs, name=name) if debug_print: print_shape_parameters(inputs[0], outputs, name, 'add') return outputs
def concat_flattened(inputs, name='', debug_print=debug_print_others): outputs = tf.concat(inputs, axis=1, name=name) if debug_print: print_shape_parameters(inputs[0], outputs, name, 'concat') return outputs