import torch
pthfile = r'E:/pycharm_code/unet-pytorch-main/unet-pytorch-main/logs/Epoch1-Total_Loss0.4523-Val_Loss0.0966.pth'
net = torch.load(pthfile, map_location='cpu')
net = dict(net)
with open('test.txt', 'a') as file0:
print(net, file=file0)