def resnet_arg_scope(weight_decay=0.0001, batch_norm_decay=0.997, batch_norm_epsilon=1e-05, batch_norm_scale=True):
 batch_norm_params = {'decay': batch_norm_decay, 'epsilon': batch_norm_epsilon, 'scale': batch_norm_scale, 'updates_collections': tf.GraphKeys.UPDATE_OPS}
 with slim.arg_scope([slim.conv2d], weights_regularizer=slim.l2_regularizer(weight_decay), weights_initializer=slim.variance_scaling_initializer(), activation_fn=tf.nn.relu, normalizer_fn=slim.batch_norm, normalizer_params=batch_norm_params):
  with slim.arg_scope([slim.batch_norm], **batch_norm_params):
   with slim.arg_scope([slim.max_pool2d], padding='SAME') as arg_sc:
    return arg_sc

def resnet_arg_scope ( weight_decay = 0.0001 , batch_norm_decay = 0.997 , batch_norm_epsilon = 1e-05 , batch_norm_scale = True ) : batch_norm_params = { 'decay' : batch_norm_decay , 'epsilon' : batch_norm_epsilon , 'scale' : batch_norm_scale , 'updates_collections' : tf . GraphKeys . UPDATE_OPS } with slim . arg_scope ( [ slim . conv2d ] , weights_regularizer = slim . l2_regularizer ( weight_decay ) , weights_initializer = slim . variance_scaling_initializer ( ) , activation_fn = tf . nn . relu , normalizer_fn = slim . batch_norm , normalizer_params = batch_norm_params ) : with slim . arg_scope ( [ slim . batch_norm ] , ** batch_norm_params ) : with slim . arg_scope ( [ slim . max_pool2d ] , padding = 'SAME' ) as arg_sc : return arg_sc
defines the default resnet arg scope .