# Questions on Fully Connected (FC) Layer

Get this book -> Problems on Array: For Interviews and Competitive Programming

**Practice multiple choice questions on Fully Connected Layers** with answers. These are the most important layer in a Machine Learning model in terms of both functionality and computation.

If you want to revise the concept, read this article ðŸ‘‰: Fully Connected Layer: The brute force layer of a Machine Learning model by Surya Pratap Singh

Let us start with the questions. Click on the right option and the answer will be explained.

## Question 1

#### What is the Fully Connected Layers?

It is the phase that generates the output

It is the last layer of CNN

It is the first layer of CNN

It is the phase that all layers are connected

FC layer looks at what high level features most strongly correlate to a particular class and has particular weights so that when you compute the products between the weights and the previous layer, you get the correct probabilities for the different classes.

## Question 2

#### What doest it mean if Fully Connected layer gives us this output: [.15, .15, .60, .10]

It says the probability of of each class

It means how many iterations we did so far

It says how many features we used

FC does not give us this kind of output

For this output, FC is saying to us that the first and second class has 15% of probability. Third class has 60% of probability and fourth class has 10%.

## Question 3

#### How Fully Connected layer operates?

Detects an input and generates a output

Generates outputs according to the features

Detects an output and generates a input

Generates inputs according to the features

This layer basically takes an input volume (whatever the output is of the conv or ReLU or pool layer preceding it) and outputs an N dimensional vector where N is the number of classes that the program has to choose from.

## Question 4

#### Considering the image above, which number represents Fully Connected layer?

2

3

1

None

We can see after Conv and Pooling layers, FC come and provides our output.

## Question 5

#### Can Fully Connected layer be used without Conv Layer?

Yes

No

Only with text

Only with images

FC layer can be used without the Conv Layer. The biggest differencial from CNN is the Conv Layer that is much more specialized and can discover more and more complex features. Then comes FC to analyse these samplings generated but Conv layers and then creates the output. Without the Conv Layer, FC could be used just fine, but in complex cases like images, it would not be so efficient.

## Question 6

#### Why Conv Layers are not replaced by Fully Connected layers?

Computationally Expensiveness

Performance

Accuracy

Conv Layers can be replaced by FC Layers

Fully Connected Layers appears only at the end of CNN for a reason. Depending on the size of what you are analysing, you will have too much parameters, increasing the cost and resources needed. Conv Layer reduces it to the most important features, keeping the efficiency considerable.

## Question 7

#### How much time is consumed by Fully Connected layer in a Machine Learning model in general?

10%

30%

5%

70%

Overall 10% Inference time is consumed by Fully Connected layer. The most computationally intensive operation is Convolution taking up to 70% of Inference time.

## Question 8

#### What is the time complexity of Fully Connected layer in a Machine Learning model for a 3D image?

O(D*W*H*N)

O(H*W)

O(H^2 * W^2)

O(W*H*N)

The time complexity of Fully Connected layer is O(D*W*H*N) where D = Channel of input, W = Width of input, H = Height of input, N = batch size of input.

## Question 9

#### What can be done by a Fully Connected layer?

Classification

Feature extraction

Dimension reduction

Feature detection

After feature extraction in a Machine Learning model, we need to classify the data into various classes, this can be done using a fully connected (FC) neural network.

## Question 10

#### In TensorFlow v2.x, Fully Connected layer (tf.contrib.layers.fully_connected()) has been removed. How to use it now?

tf.keras.layers.Dense

tf.layers.fully_connected()

tf.fully_connected()

tf.layers.Dense

In TensorFlow v2.x, tf.contrib has been removed. Fully connected layers can be used with tf.keras.layers.Dense but you need to use Keras API.

With these questions on Fully Connected layers at OpenGenus, you must have a good idea of Fully Connected layers. Enjoy.