Question
I am training a dataset with age in humans and when I run model's compile metrics='accuracy', I don't want it to compute the exact accuracy,
I am training a dataset with age in humans and when I run model's compile metrics='accuracy', I don't want it to compute the exact accuracy, but just look for a certain age range and compute the accuracy if it correctly identifies the age range. I am wondering how I could do this. Can I simply edit the compile function?
So what I am starting with is
What I am trying to do is to extract the age, check if it is in a certain range, say 20 - 30 and then determine the accuracy based on if the program is correct in seeing it is 20 - 30 as opposed to checking the accuracy if the program can recognize the exact age. What I thought would be easiest is to add a new metric to the model.compile function seen in lines 71-72 of the train.py file
model.compile(optimizer=sgd, loss=["categorical_crossentropy", "categorical_crossentropy"], metrics=['accuracy'])
A problem I am having is I am not sure how to check the actual age from this file to plug it into the custom metric or even creating a callback
From here, I assume I would have to edit the plot_history.py file to actually plot the accuracy.
If anybody has any ideas, that would be a tremendous help
Thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started