inputs and outputs of a fully connected layer for a note classifier
Starting with your last question: The final fully-connected layer shoud output the number of target classes you have. This output can then be passed to a softmax, which normalises the values between the range [0, 1] - allowing them to be interpreted as probabilities.

Remember, you train using the following dimensions:

[batch_size, height, width, channels]        # channels = 1 (in your case) so is removed


You always need to maintain the batch_size through one loop forwards and backwards through your neuiral network. Normally it set to None which allows the model to accept any batch size you decide on.

What people mean by "make a vector" is that the output of your convolutional layers will be a 3D (including channels) and so 2D in your case. You need to flatten these into a single vector. The conv layer output, which then flows into the fully-connected layers will then be:

[batch_size, height * width]         # height and width are those from the final conv layer


Depending on your framework, there will be a layer called Flatten or view etc., which gives you the vector for each image, keeping the batch_size. This is performed as part of the model structure and so is applied to all data as it passes through the model (training, validation and test data).