RuntimeError: Error(s) in loading state_dict for Generator:

net.load_state_dict(weights)
#修改为
net.load_state_dict(weights,strict=False)

你可能感兴趣的:(Error,python)