Closed bioimageiobot closed 1 year ago
Hey @FynnBe and @constantinpape we tested this model using the bioimageio.core library (test_model
) and it passed for both keras and tensorflow. However, it fails here. Any idea?
the error:
'Exception encountered when calling layer "lambda_833" (type Lambda).\n'
'\n'
"name 'K' is not defined\n"
seems to be related to the tf/keras version used: https://github.com/tensorflow/tensorflow/issues/54198
and internally caused by some missing
from keras import backend as K
https://stackoverflow.com/questions/72489926/keras-name-k-is-not-defined
The conda environment the CI runs the test in is:
channels: [conda-forge]
dependencies: [bioimageio.core, tensorflow ==2.11.*]
Are you sure you are testing locally with TF 2.11? If so, is it installed via pip? And was the model created with TF 2.11 or maybe an earlier version?
The model was taken from: https://github.com/qc17-THU/DL-SR .
They specify that in their environment they use:
The layers have been updated and instead of using the ones from Keras, they are imported from TF as it is done in: https://github.com/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/Beta%20notebooks/DFCAN_ZeroCostDL4Mic.ipynb .
In the colab notebook, that is where the testing (test_model
) is done, the version of TF is tf.__version__
== '2.11.0' .
Which one should be the solution, changing the TF version in the colab notebook?
@IvanHCenalmor Could you try to test the model in a separate script/notebook?
In the linked zero cost notebook, from tensorflow.keras import backend as K
is included, thus K
available... maybe reexporting the model with TF 2.11 in that environment can help.
This is an automatic PR created by the @bioimageiobot regarding changes to the resource item 10.5281/zenodo.7781877. The following version(s) will be added:
Please review the changes and make sure the new item or version(s) pass the following check list:
Maintainers: @esgomezm, @IvanHCenalmor
Note: If you updated or re-uploaded another version for the current item on Zenodo, this PR won't be changed automatically. To proceed, you can do the following:
status
field asaccepted
, but change thestatus
under the current version toblocked
.Keep proposed version(s) (and this resource in general if it is new) as pending: Close this PR without merging.
Then wait for the CI on the main branch to complete. It should detect the new version(s) and create another PR for the new version(s).
Previous PRs of this resource: none