def create_state(name, model, optimizer):
    states[name] = {'epoch': (epoch + 1), 'state_dict': model.state_dict(), 'optimizer': optimizer.state_dict()}
def create_state(name, model, optimizer):
    states[name] = {'epoch': (epoch + 1), 'state_dict': model.state_dict(), 'optimizer': optimizer.state_dict()}