def atrous_conv2d(x, kernel, rate=1, border_mode='valid', dim_ordering='default', image_shape=None, filter_shape=None):
 if (dim_ordering == 'default'):
  dim_ordering = image_dim_ordering()
 if (dim_ordering not in {'th', 'tf'}):
  raise ValueError(('Unknown dim_ordering ' + str(dim_ordering)))
 if (rate == 1):
  return conv2d(x, kernel, strides=(1, 1), border_mode=border_mode, dim_ordering=dim_ordering)
 x = _preprocess_conv2d_input(x, dim_ordering)
 kernel = _preprocess_conv2d_kernel(kernel, dim_ordering)
 padding = _preprocess_border_mode(border_mode)
 x = tf.nn.atrous_conv2d(x, kernel, rate, padding)
 return _postprocess_conv2d_output(x, dim_ordering)

def atrous_conv2d ( x , kernel , rate = 1 , border_mode = 'valid' , dim_ordering = 'default' , image_shape = None , filter_shape = None ) : if ( dim_ordering == 'default' ) : dim_ordering = image_dim_ordering ( ) if ( dim_ordering not in { 'th' , 'tf' } ) : raise ValueError ( ( 'Unknown dim_ordering ' + str ( dim_ordering ) ) ) if ( rate == 1 ) : return conv2d ( x , kernel , strides = ( 1 , 1 ) , border_mode = border_mode , dim_ordering = dim_ordering ) x = _preprocess_conv2d_input ( x , dim_ordering ) kernel = _preprocess_conv2d_kernel ( kernel , dim_ordering ) padding = _preprocess_border_mode ( border_mode ) x = tf . nn . atrous_conv2d ( x , kernel , rate , padding ) return _postprocess_conv2d_output ( x , dim_ordering )
atrous 2d convolution .