I 've debugged,and I found the mistake,I post it here ,hope to get a clear explanation from U cos I really puzzled why it happened here.
It my forward pass. I create 8 residual block with name res1 to res8,and in forward pass I use
#res block 
        def make_resblock(in_channels, out_channels, kernel_size, stride, padding):
            return nn.Sequential(
                nn.ReflectionPad2d(padding),
                nn.Conv2d(in_channels, out_channels, kernel_size, stride),
                nn.BatchNorm2d(out_channels),
                nn.ReLU(),
                nn.ReflectionPad2d(padding),
                nn.Conv2d(in_channels, out_channels, kernel_size, stride),
                nn.BatchNorm2d(out_channels),
                nn.ReLU()
            )
        self.res1=make_resblock(256,256,3,1,1)
#others are same
#this part in  forward pass
 for i in range(1,9):
        res = input
        input=getattr(self,'res{}'.format(i))(input)
        input=res+input

when i commented this part ,the code runs correctly.
But I’m puzzled ,Why? is there sth wrong?