-
Notifications
You must be signed in to change notification settings - Fork 389
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
How to use keras_tuner to improve 1d-cnn model without Sequential() or model. add #956
Comments
I used this site for the first time and i'm sorry that there are some problems with the typesetting. my question is: my 1d-cnn code is quite special and it does not use th code like Sequential() or model. add(). if anyone is interested, I have upload this code below. However, once I want to use the keras_tuner to improve me model i cannot figure out how to tell the code the parameters that i want to optimize. I found many code while they are used Sequential() or model. add() which do not serve as my direct reference. Thank you very much for your help. |
You can define it in custom keras.Model class right? |
Describe the bug
this is my code:fea_cnt = 24 # number of features
numb = 3 # type of classcification
def build_model(fea_cnt, numb):
K.clear_session()
METRICS = [
keras.metrics.TruePositives(name='tp'),
keras.metrics.FalsePositives(name='fp'),
keras.metrics.TrueNegatives(name='tn'),
keras.metrics.FalseNegatives(name='fn'),
keras.metrics.BinaryAccuracy(name='accuracy'),
keras.metrics.Precision(name='precision'),
keras.metrics.Recall(name='recall'),
keras.metrics.AUC(name='auc'),
keras.metrics.AUC(name='prc', curve='PR'), # precision-recall curve
]
To Reproduce
Expected behavior
Additional context
Would you like to help us fix it?
The text was updated successfully, but these errors were encountered: