Hello Frank,
Firstly sorry for the late reply. I have been pretty caught up lately.



 KFrank:

It really depends on what you want to do. What is your proposed
Conv2d supposed to accomplish? What is the final Linear supposed
to accomplish?


Yes, my aim was to use softmax at the last layer. So, that’s why i was thinking to use Linear as my last layer of the network (so that I can then send use the softmax) then the question arrived that whether it performs convoution or not.



 KFrank:

In that case, you will probably want to use CrossEntropyLoss as
your loss criterion. Therefore you will not want to use an explicit
Softmax as CrossEntropyLoss has, in effect, Softmax built in.


So as you said Cross entropy loss has a built in softmax, so i think I can end my model at the last as just one convolution layer with no activation and will straight away send that output to Cross Entropy loss. (Also give your thoughts)



 KFrank:

So you might as well
just have a single Linear layer (no Conv2d) for which you will need
to flatten the (non-batch dimensions of the) tensor you pass into the
Linear. This is illustrated below.


I don’t think if there a need to flatten out and send it to linear layer based on what I said above.
And thanks for all the extra effort you put up.