Newbie in keras:
I am trying to understand the syntax used in keras. Syntax that I am having difficult in understanding is while building a network. I have seen in number of places as also described in following code.
Statements like: current_layer = SOME_CODE(current_layer)
What is the meaning of such a statement? Does it means first the computation described in SOME_CODE
is to be followed to the computation described in the current layer?
What is the use of such a syntax and when should one use it? Any advantages and alternatives?
input_layer = keras.layers.Input(
(IMAGE_BORDER_LENGTH, IMAGE_BORDER_LENGTH, NB_CHANNELS))
current_layer = image_mirror_left_right(input_layer)
current_layer = keras.layers.convolutional.Conv2D(
filters=16, "some values " ])
)(current_layer)
def random_image_mirror_left_right(input_layer):
return keras.layers.core.Lambda(function=lambda batch_imgs: tf.map_fn(
lambda img: tf.image.random_flip_left_right(img), batch_imgs
)
)(input_layer)