Exemple #1
0
def upsample3d(inputs, kernel_size, name='', data_format='channels_first', debug_print=debug_print_upsample):
    outputs = tf.identity(tf.contrib.keras.layers.UpSampling3D(kernel_size, data_format=data_format, name=name)(inputs), name=name+'/output')
    if debug_print:
        print_upsample_parameters('nn',
                                  inputs,
                                  outputs,
                                  kernel_size,
                                  name,
                                  data_format,
                                  'same',
                                  kernel_size)
    return outputs
def upsample2d(inputs,
               kernel_size,
               name='',
               data_format='channels_first',
               debug_print=debug_print_upsample):
    outputs = tf.keras.layers.UpSampling2D(kernel_size,
                                           data_format=data_format,
                                           name=name)(inputs)
    if debug_print:
        print_upsample_parameters('nn', inputs, outputs, kernel_size, name,
                                  data_format, 'same', kernel_size)
    return outputs