Skip to content

[pre-commit.ci] pre-commit autoupdate #18

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.11.6'
rev: 'v0.11.12'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 3 additions & 1 deletion explain.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def update_sample(samples, N, sample):
)

# Load the trained model
model = tf.keras.models.load_model(os.path.join(args.input_dir, "nn_model_sherlock.keras"))
model = tf.keras.models.load_model(
os.path.join(args.input_dir, "nn_model_sherlock.keras")
)

# Produce a randomly sample of background from the training data
background = []
Expand Down
10 changes: 5 additions & 5 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,31 @@
regex_model1 = BatchNormalization(axis=1)(regex_model_input)
regex_model2 = Dense(
1000,
activation='relu',
activation="relu",
kernel_regularizer=tf.keras.regularizers.l2(0.0001),
)(regex_model1)
regex_model3 = Dropout(0.35)(regex_model2)
regex_model4 = Dense(
1000,
activation='relu',
activation="relu",
kernel_regularizer=tf.keras.regularizers.l2(0.0001),
)(regex_model3)

merged_model2 = BatchNormalization(axis=1)(regex_model4)
merged_model3 = Dense(
500,
activation='relu',
activation="relu",
kernel_regularizer=tf.keras.regularizers.l2(0.0001),
)(merged_model2)
merged_model4 = Dropout(0.35)(merged_model3)
merged_model5 = Dense(
500,
activation='relu',
activation="relu",
kernel_regularizer=tf.keras.regularizers.l2(0.0001),
)(merged_model4)
merged_model_output = Dense(
len(le.classes_),
activation='softmax',
activation="softmax",
kernel_regularizer=tf.keras.regularizers.l2(0.0001),
)(merged_model5)

Expand Down
Loading