Skip to content

Commit

Permalink
Check if provided model is weights only and work around
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Oct 8, 2024
1 parent 594b5c0 commit e3eabd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cellfinder/core/classify/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ def main(
workers=workers,
)

if trained_model and trained_model.suffix == ".h5":
print(
"Weights provided in place of the model, "
"loading weights into default model"
)
model_weights = trained_model
trained_model = None

model = get_model(
existing_model=trained_model,
model_weights=model_weights,
Expand Down
Empty file added debug.py
Empty file.

0 comments on commit e3eabd8

Please sign in to comment.