I want to save model for each epoch
but my training process is using model.fit();
not using for loop
the following is my code:
model.fit(inputs, targets, optimizer, ctc_loss, batch_size, epoch=epochs)
torch.save(model.state_dict(), os.path.join(model_dir, ‘savedmodel.pt’))
any suggestion to save model for each epoch
thanks in advance