The first two nn.Conv3d layers with an an input of [1, 1, 160, 256, 256] will already take ~20GB during the forward pass (with intermediate activation needed for the backward pass). The complete model will thus have a much higher memory usage and I assume your GPU doesn’t have enough memory.