def custom_layer(incoming, custom_fn, **kwargs):
 name = 'CustomLayer'
 if ('name' in kwargs):
  name = kwargs['name']
 with tf.name_scope(name):
  inference = custom_fn(incoming, **kwargs)
 return inference

def custom_layer ( incoming , custom_fn , ** kwargs ) : name = 'CustomLayer' if ( 'name' in kwargs ) : name = kwargs [ 'name' ] with tf . name_scope ( name ) : inference = custom_fn ( incoming , ** kwargs ) return inference
custom layer .