-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve metrics docs: 2 types of API #1540
Comments
@vfdev-5 I am familiar with precision = Precision()
precision.attach(engine, 'precision')
@engine.on(Events.EPOCH_STARTED)
def reset():
precision.reset()
def process_fn(e, b):
...
precision.update((pred, target))
@engine.on(Events.EPOCH_COMPLETED)
def compute():
precision.compute() |
We have introduced ignite/ignite/metrics/metric.py Line 52 in 5ceacbb
The doc is here : https://pytorch.org/ignite/metrics.html#metrics-and-its-usages The relevant PR is #979 HTH |
@ydcjeff yes, the idea is to show how to use reset/update/compute API without relation to the engine: precision = Precision()
precision.update((pred1, target1))
precision.update((pred2, target2))
precision.update((pred3, target3))
print("Precision: ", precision.compute())
precision.reset()
precision.update((pred1, target1))
precision.update((pred2, target2))
precision.update((pred3, target3))
print("Precision: ", precision.compute()) |
@ydcjeff would you like to send a PR to fix this issue ? |
I can only send in next weeks |
馃殌 Feature
Following #1538 it would be nice to explicitly mention here that there are 2 types of API :
and give examples.
The text was updated successfully, but these errors were encountered: