You just do this at the python level as in:
m1 = torch.nn.Sequential(
    torch.nn.Linear(10,10),
    torch.nn.Linear(10,10),
    torch.nn.Linear(10,10),
                    )
m2 = torch.nn.Sequential(
    torch.nn.Linear(10,10),
    torch.nn.Dropout(p=0.2),
    torch.nn.Linear(10,10),
    torch.nn.Dropout(p=0.2),
    torch.nn.Linear(10,10),
                    )
mapping = {}
idxold = 0
for i,l in enumerate(m2):
    if not isinstance(l, torch.nn.Dropout):
        mapping[idxold] = i
        idxold += 1

sd1 = m1.state_dict()
sd1.keys()
sd2 = {}
for k in sd1:
    ksplit = k.split('.')
    ksplit[0] = str(mapping[int(ksplit[0])])
    knew = '.'.join(ksplit)
    sd2[knew] = sd1[k]

m2.load_state_dict(sd2)