when use conv and deconv, the out put shape does not math(The input image's weight is odd)
such as the input shape=[1,64,12,60,33]
when i use
nn.Conv3d(in_channels=128, out_channels=64, kernel_size=(3, 3, 3), stride=2, padding=1)

the out put shape =[1,64,6,30,17]
after that i want to let the output return to [1,64,12,60,33]
but when i use
 nn.ConvTranspose3d(in_channels=128, out_channels=64, kernel_size=(3, 3, 3), stride=2, padding=1,output_padding=1)

the out put become to [1, 64, 12, 60, 34] that is not i want.
how can i fixed this problem? i mean i want the nextwork doesn't matter the input's shape(of course i don't use dense layer, just conv and deconv)
for example:
input = torch.randn((1,64,12,60,33))
C3d=torch.nn.Conv3d(64,64,kernel_size=(3,3,3),stride=2 ,padding=1)
output_conv = C3d(input)#shape==[1,64,6,30,17]
de_C3d = torch.nn.ConvTranspose3d(64,64,(3,3,3),stride=2,padding=1)
output_deconv=de_C3d(out_conv) #shape = [1,64,11,59,33]

i just want the output_deconv.shape equal to input

If you're dealing with tensors of arbitrary shapes, this can be difficult. If they're fixed you can add ad hoc fixes which should solve your problem. One way is to utilise the fact that you can pass tuples to the arguments padding and output_padding, which will work in your case:
input = torch.randn((1,64,12,60,33))
C3d=torch.nn.Conv3d(64,64,kernel_size=(3,3,3),stride=2 ,padding=1)
output_conv = C3d(input) #shape==[1,64,6,30,17]
de_C3d = torch.nn.ConvTranspose3d(64,64,(3,3,3),stride=2,padding=1,output_padding=(1,1,0))
output_de=de_C3d(out_conv) #shape = [1,64,12,60,33]

You could also pad and then crop, which is commonly done in UNet architectures:
de_C3d = torch.nn.ConvTranspose3d(64,64,(3,3,3),stride=2,padding=0)
output_deconv=de_C3d(out_conv) #shape = [1,64,13,61,35]
output_deconv = output_deconv[:,:,:input.shape[2],:input.shape[3],:input.shape[4]]

I guess one way to fix this is to add different padding to the inputs depending on whether they're odd or even:
de_C3d = torch.nn.ConvTranspose3d(64,64,(3,3,3),stride=2,padding=1,
          output_padding=tuple([(i+1)%2 for i in input.shape[2:]]))
output_deconv=de_C3d(out_conv) #shape = [1,64,12,60,33]

