HenriquesLab / HenriquesLab/DL4MicEverywhere

Error in U-Net_2D_Multilabel_ZeroCostDL4Mic.ipynb: IndexError: list index out of range

Open
#52 2 comments 0 reactions 1 assignee View on GitHub

@IvanHCenalmor is already working on this.

Since Aug 26, 2024.

bug
Dominant language
Jupyter Notebook
Stars
87
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I get the following error in section 5.1 Generate prediction(s) from unseen dataset when running the notebook U-Net_2D_Multilabel_ZeroCostDL4Mic.

IndexError: list index out of range

The error happens in function_29, in the following line:

print('Model input size: '+str(Input_size[0])+'x'+str(Input_size[1]))

I believe what is happening here is that Input_size is [(None, 256, 256, 1)], where Input_size[0] is the None (the batch size)

If comment the Input_size everywhere in the function I am able to get the predictions:
Screenshot 2024-08-26 at 21 57 46

To Reproduce
I have run the following sections of the notebook:

  1. Install U-Net dependencies
    1.1. Load key dependencies
  2. Select your parameters and paths
    2.1. Setting main training parameters
    2.2. Data augmentation
    Here I disable Use_Data_augmentation
    2.3. Using weights from a pre-trained model as initial weights
  3. Using the trained model
    5.1 Generate prediction(s) from unseen dataset
    Here in setion 5.1 is where I get the error.

Describe the bug
See beginning of the message

Expected behavior
Get model predictions

Screenshots
Screenshot 2024-08-26 at 21 59 47

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Browser: chrome
  • Version: chrome version 127.0.6533.122

My version of the notebook is:

6. Version log
v2.1.2:

Correct for data loading to avoid .DS_Store or similar
v2.1.1:

Replaced all absolute pathing with relative pathing
v2.1:

Updated to TensorFlow 2.11
Updated to fpdf2 and add lines to ensure a proper format. Correct keras package version parsing.

Smartphone (please complete the following information):
Does not apply

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.