OMG!
I checked my densenet class, and I found that I misspelled the word “forward”… Now it can run normally.
Thank you!!