@scopes.add_arg_scope
def dropout(inputs, keep_prob=0.5, is_training=True, scope=None):
 if (is_training and (keep_prob > 0)):
  with tf.name_scope(scope, 'Dropout', [inputs]):
   return tf.nn.dropout(inputs, keep_prob)
 else:
  return inputs

@ scopes . add_arg_scope def dropout ( inputs , keep_prob = 0.5 , is_training = True , scope = None ) : if ( is_training and ( keep_prob > 0 ) ) : with tf . name_scope ( scope , 'Dropout' , [ inputs ] ) : return tf . nn . dropout ( inputs , keep_prob ) else : return inputs
returns a dropout layer applied to the input .