Do you have a first attempt on porting this code and could share it?
If not, you could start by implementing a custom module, define all layers in its __init__ method and write the forward pass in its forward:
class CBR(nn.Module):
    def __init__(self, in_channels, out_channels, kernel, stride, dilation):
        self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, stride, dilation)
        self.bn = nn.BatchNorm1d(out_channels)
        
    def forward(self, x):
        x = self.conv(x)
        x = F.relu(self.bn(x))
        return x

class SEBlock(nn.Module):
    ...

class ResBlock(nn.Module):
    ...


class UNet(nn.Module):
    def __init__(self):
        super(UNet, self).__init__()
        self.cbr = CBR(...)
        ...
        
    def forward(self, x):
        ...