x.view(x.size(0),-1)
This line is not a part of code I just tray to over come error find this line to resolve the error
My basic code start from layer1
I again calculate the network and tray again if found any error tell you about that
Thank you for your help it clears my concepts