Created
April 19, 2022 08:32
-
-
Save ntakouris/b4436603f740acada6bc208a70fc377a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Scopes: | |
Training = "train" | |
Validation = "val" | |
Test = "test" | |
# support multiple experiment types and structures with ease | |
class Metrics: | |
Loss = "loss" | |
class ObjectDetection: | |
tag_name = "det" | |
MeanAveragePrecision = "mAP" | |
class Classification: | |
tag_name = "cls" | |
Top1Accuracy = "Accuracy@1" | |
# if you want to do dynamic things | |
# like scoped(Metrics.Loss, Scopes.Training, Metrics.ObjectDetection.tag_name) | |
def scoped(metric: str, *scopes): | |
return "/".join(scopes) + f"/{metric}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment