First of all, I'd like to thank you for that great library.
However, I couldn't achieve a solution of my problem. I should use a different approach during the training stage and the evaluation stage. In PyTorch I could do this like this:
````
for epoch in range(1, n_epochs + 1):
model.train()
for data, target in train_loader:
#bla bla
output = model(data, training = True)
#bla bla
model.eval()
for data, target in valid_loader:
#bla bla
output = model(data, training = False)
#bla bla
````
How can I achieve this using Ignite library?
you don't have to have that argument at all.
Each nn.Module has a self.training parameter that is set by model.train() and model.eval()
@furkan-kucuk please take a look at the quickstart and examples.
For more details you can consult the implementations of create_supervised_trainer and create_supervised_evaluator.
If you find out the quickstart unclear or cumbersome, please post your feedback here.
you don't have to have that argument at all.
Each
nn.Modulehas aself.trainingparameter that is set bymodel.train()andmodel.eval()
Thanks for the tremendous and fastest answer ever! You totally solved my problem!
@furkan-kucuk please take a look at the quickstart. For more details you can consult the implementations of
create_supervised_trainerandcreate_supervised_evaluator.If you find out the quickstart unclear or cumbersome, please post your feedback here.
Thank you for fast answer. I really admire your work and thankful for it!
@furkan-kucuk you're welcome.
I'll close the issue as it was solved. Feel free to reopen if you needed more precisions on this question