Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I did not successfully compile your code #4

Open
wangk98 opened this issue Mar 6, 2021 · 5 comments
Open

I did not successfully compile your code #4

wangk98 opened this issue Mar 6, 2021 · 5 comments

Comments

@wangk98
Copy link

wangk98 commented Mar 6, 2021

Hello, When I run the code of "mode = 'training“, the following error appears.
QQ图片20210306171917

Do you know how to solve it?

@AlirezaShamsoshoara
Copy link
Owner

Hello @wangk98, thanks for raising this issue. This case for the plot only works if you train your model with the METRIC parameters:

METRICS = [
keras.metrics.TruePositives(name='tp'),
keras.metrics.FalsePositives(name='fp'),
keras.metrics.TrueNegatives(name='tn'),
keras.metrics.FalseNegatives(name='fn'),
keras.metrics.Accuracy(name='accuracy'),
keras.metrics.BinaryAccuracy(name='bin_accuracy'),
keras.metrics.Precision(name='precision'),
keras.metrics.Recall(name='recall'),
keras.metrics.AUC(name='auc')
]

However, in the current version, only, accuracy was used as a metric. Hence, if you make these changes, there won't be any issue:
In plotdata.py, change line#21

to this:

(fig, ax) = plt.subplots(1, 1, figsize=(13, 13))

and comment out lines# 34 - 45 (inclusive).

I will make these changes in a new branch and I will submit them. Let me know if there is still any issues.

Good luck!

@wangk98
Copy link
Author

wangk98 commented Mar 7, 2021

Sorry to disturb you again. After I changed it according to the above method, the following error was reported:
IMG_20210307_210558
Then I change line#21(in plotdata.py) to (fig, ax) = plt.subplots(2, 1, figsize=(13, 13),squezee=False)
the following error was reported:
IMG_20210307_205937
and I do not know how to solve it

@hyojun-rtdata
Copy link

Hello, thank you for you Great research.
I compile your code I have same error.

I changed code and commet lines.

image

@cryptedwcoder
Copy link

cryptedwcoder commented Jul 20, 2022

@hyojun-rtdata @wangk98 @AlirezaShamsoshoara Did you solve it ?

@MArslan95
Copy link

MArslan95 commented May 14, 2024

@AlirezaShamsoshoara
Screenshot 2024-05-14 164712
Hi I hope you doing well I ran your code In my system while running. I get the val_loss as nan I tried to find the sol but didn't find anything regarding this so please if you know the reason let me know thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants