In this recipe, let's create the first fully connected layer.
The following are the inputs to the function defined in the recipe Using functions to flatten the densely connected layer, create_fc_layer
:
Input
: This is the flattened convolution layer; that is,layer_flat
Num_inputs
: This is the number of features created post flattening,num_features
Num_outputs
: This is the number of fully connected neurons output,fc_size
Use_relu
: This is the binary flag set toTRUE
to incorporate non-linearity in the tensor
- Run the
create_fc_layer
function with the preceding input parameters:
layer_fc1 = create_fc_layer(input=layer_flat, num_inputs=num_features, num_outputs=fc_size, use_relu=TRUE)