I tried the 2d version of your code that I get the error of the padding='same'. I posted the error here.
Can be the version of pytorch be a problem?
`TypeError                                 Traceback (most recent call last)
 in 
1 # testing
2 x = torch.randn((1,1,572, 572))
----> 3 pred = model(x)
4 pred.shape
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725             result = self._slow_forward(*input, **kwargs)
726         else:
 → 727             result = self.forward(*input, **kwargs)
728         for hook in itertools.chain(
729                 _global_forward_hooks.values(),
 in forward(self, x)
25         # CONTRACTION
26         # down 1
—> 27         x = self.down1(x)
28         skip_connections.append(x)
29         x = self.pool(x)
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725             result = self._slow_forward(*input, **kwargs)
726         else:
 → 727             result = self.forward(*input, **kwargs)
728         for hook in itertools.chain(
729                 _global_forward_hooks.values(),
 in forward(self, x)
10
11     def forward(self, x):
—> 12         return self.process(x)
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725             result = self._slow_forward(*input, **kwargs)
726         else:
 → 727             result = self.forward(*input, **kwargs)
728         for hook in itertools.chain(
729                 _global_forward_hooks.values(),
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/container.py in forward(self, input)
115     def forward(self, input):
116         for module in self:
 → 117             input = module(input)
118         return input
119
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725             result = self._slow_forward(*input, **kwargs)
726         else:
 → 727             result = self.forward(*input, **kwargs)
728         for hook in itertools.chain(
729                 _global_forward_hooks.values(),
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/conv.py in forward(self, input)
421
422     def forward(self, input: Tensor) → Tensor:
 → 423         return self._conv_forward(input, self.weight)
424
425 class Conv3d(_ConvNd):
~/anaconda3/envs/vir-env/lib/python3.8/site-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight)
417                             weight, self.bias, self.stride,
418                             _pair(0), self.dilation, self.groups)
 → 419         return F.conv2d(input, weight, self.bias, self.stride,
420                         self.padding, self.dilation, self.groups)
421
TypeError: conv2d(): argument ‘padding’ (position 5) must be tuple of ints, not str
`