When you say It might work, is there a possibility that it is not working as intended? I just want to be absolutely sure. I am using the UNet in this repo:

  
      github.com
  
  
    jvanvugt/pytorch-unet/blob/master/unet.py 17
# Adapted from https://discuss.pytorch.org/t/unet-implementation/426

import torch
from torch import nn
import torch.nn.functional as F


class UNet(nn.Module):
    def __init__(
        self,
        in_channels=1,
        n_classes=2,
        depth=5,
        wf=6,
        padding=False,
        batch_norm=False,
        up_mode='upconv',
    ):
        """
        Implementation of


  This file has been truncated. show original

  
  
    
    
  
  


and my fold loop is like such:
for fold in range 5:
   model = UNet().to(device)
   optimizer = torch.optim.adam(model.parameters(), learning rate)
   criterion = ...
   #select data
   #train/validate