Thank you very much for answering my question. The error dose come form batchsize 1, and i use 'unsqueezing ’ that can solve error. The error doesn’t come from my network. If you were confuesd by my network, i’m very sorry for that.
And thanks again.