I have found the solution. Instead of first create modulelist and assign weights for each part, the base model is created and assigned weights directly, then the base models (which has been assigned pre-trained weights) are implemented in the modulelist. The final result shows that this process is right.
But I still wonder that why the previous method is wrong. Maybe someone can explain…
import pandas as pd
import numpy as np
import random
import scipy.io
import os
from copy import deepcopy
#gridsearch/randomsearch
from itertools import product
from tqdm import tqdm

#visualize results
import matplotlib.pyplot as plt
import time

import torch
import torchvision
from torch import nn
from torch.autograd import Variable
from torch.utils.data import Subset,DataLoader,TensorDataset
from torchvision import datasets,transforms
import torch.nn.functional as F

#resnet18, using as the backbone
from torchvision.models import resnet18

def set_seed(seed):
    np.random.seed(seed)
    torch.manual_seed(seed)
    random.seed(seed)

    torch.backends.cudnn.deterministic = True
    torch.backends.cudnn.benchmark = False

# import warnings
# warnings.filterwarnings("ignore")

if torch.cuda.is_available():
    n_gpu = torch.cuda.device_count()
    print(f'number of gpu: {n_gpu}')
    print(f'cuda name: {torch.cuda.get_device_name(0)}')
  
    is_cuda=True
    print('GPU is on')
else:
    is_cuda=False
    print('GPU is off')

class unet_ensemble(nn.Module):
    def __init__(self, base_model_list): 
        super(unet_ensemble,self).__init__()
        
        #nn.modulelist
        self.feature_ensemble = nn.ModuleList([_ for _ in base_model_list])
    
    def forward(self,X):
        pass

saved_name = 'model_base'
seed = 42

#save base model
for i in range(5):
    set_seed(i)
    model = resnet18(pretrained=False)
    model.add_module('fc',nn.Linear(512,1))
    
    torch.nn.init.xavier_uniform_(model.conv1.weight)
    torch.save(nn.Sequential(*list(model.children())[:-1]),  os.path.join('./', saved_name + '_epoch_'+ str(i) + '.pth'))

#selected epochs for ensembling

base_model_list = []

#loaded pretrained model parameters for each epoch
for epoch in tqdm(range(5)):
    set_seed(seed)
    base_model = resnet18(pretrained=False)
    base_model = nn.Sequential(*list(base_model.children())[:-1])

    if is_cuda:
        base_model.cuda()
    
    loaded_dict_epoch = torch.load(os.path.join('./', saved_name + '_epoch_'+ str(epoch) + '.pth'))

    base_model.load_state_dict(loaded_dict_epoch.state_dict())
    base_model_list.append(base_model)
    
#ensemble model
set_seed(seed)
model_se = unet_ensemble(base_model_list=base_model_list) #initialization

if is_cuda:
    model_se.cuda()
    
#验证
verify = []
for i in range(5):
    loaded_dict_epoch = torch.load(os.path.join('./', saved_name + '_epoch_'+ str(epoch) + '.pth'))
    
    for k,v in loaded_dict_epoch.state_dict().items():
        verify.append(torch.all(torch.eq(model_se.state_dict()['feature_ensemble.' + str(epoch) + '.' + k], loaded_dict_epoch.state_dict()[k])))
        
print(torch.all(torch.tensor(verify)))
print(model_se.state_dict()['feature_ensemble.0.0.weight'][:2,0,0,0])
print(model_se.state_dict()['feature_ensemble.4.0.weight'][:2,0,0,0])