Skip to content
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

error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 #325

Open
jazberna1 opened this issue Aug 28, 2024 · 0 comments
Open

error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 #325

jazberna1 opened this issue Aug 28, 2024 · 0 comments

Comments

@jazberna1
Copy link

Hi,

I just run the U-Net_3D_ZeroCostDL4Mic.ipynb notebook:

In section 3.1. Choosing parameters this line fails:

tgt_sample = tifffile.imread(training_target_sample).astype(np.bool)

the error is:
AttributeError: module 'numpy' has no attribute 'bool'.

I believe it works by changing np.bool to bool

In class SampleImageCallback(Callback) in the init method the code fails with:
AttributeError: can't set attribute 'model'

I believe it works by changing self.model = model to self.set_model(model)

Also this line in the dice_coefficient function fails due to type differences:
y_true_f = K.flatten(y_true)

I believe if works by replacing it by y_true_f = tf.cast(y_true_f, tf.float32)

The notebook I am using is:

7. Version log
v2.1.3:

Changed default voxel size for Bioimage Model Zoo format export
v2.1.2:

Prediction results should now correctly be saved as volumes
Updated deprecated code for saving BigTIFF volumes
v2.1.1:

Replaced all absolute pathing with relative pathing
v2.1:

Updated notebook to use with TensorFlow 2.11

The full requirements file is exported to replicate the environment

Bug in the preprocessing to be compatible with the BioImage Model Zoo is solved.

Installs fpdf2, curates the format of the pdf and fixes bugs in keras versioning writting.
@jazberna1 jazberna1 changed the title erroes while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant