question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing a parameter to model's forward pass on an event

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
miguelvrcommented, Dec 14, 2018

@furkan-kucuk you’re welcome.

1reaction
iamkucukcommented, Dec 14, 2018

@furkan-kucuk please take a look at the quickstart. 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.

Thank you for fast answer. I really admire your work and thankful for it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forward pass and backward pass in project scheduling
Forward pass is a technique to move forward through network diagram to determining project duration and finding the critical path or Free Float ......
Read more >
Passing event and argument to v-on in Vue.js
I like this way of passing parameters because we can pass events and parameters both using an anonymous callback function.
Read more >
How to send multiple parameters to Event in LWC
Pass a JS Object direct into detail const selectedEvent = new CustomEvent('custevent', { detail: { type: "Fiat", model:"500", color:"white" } ...
Read more >
Pass Parameters to a Service API - AWS Step Functions
Use the "Parameters" field in a Task state to control what parameters are passed to a service API. Pass Static JSON as Parameters....
Read more >
How to pass parameter in event
Passes a string value. Notification events pass the Sys ID of the user with the gs.getUserID() method. Other scripts can reference this string...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found