Skip to content

Commit

Permalink
setting backend to torch (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Feb 9, 2024
1 parent 89339fa commit 5310e94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cellfinder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
# If no backend is configured and installed for Keras, tools cannot be used
# Check backend is configured
if not os.getenv("KERAS_BACKEND"):
os.environ["KERAS_BACKEND"] = "tensorflow"
os.environ["KERAS_BACKEND"] = "torch" # "tensorflow"
warnings.warn(
"Keras backend not configured, automatically set to Tensorflow"
"Keras backend not configured, automatically set to torch"
)

# Check backend is installed
Expand Down
3 changes: 3 additions & 0 deletions cellfinder/core/train/train_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ def run(
epochs=epochs,
callbacks=callbacks,
)
# model.built = True,
# model.compiled=True, and
# compile_metrics_unbuilt ---> I get error

if save_weights:
logger.info("Saving model weights")
Expand Down

0 comments on commit 5310e94

Please sign in to comment.