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
Пример #2
0
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
Пример #3
0
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
Пример #4
0
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
Пример #5
0
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