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

Getting Value Error #5

Open
nitinkumar070 opened this issue Jun 15, 2022 · 6 comments
Open

Getting Value Error #5

nitinkumar070 opened this issue Jun 15, 2022 · 6 comments

Comments

@nitinkumar070
Copy link

ValueError: The two structures don't have the same sequence length. Input structure has length 4, while shallow structure has length 3.
Getting this error after running the code. #
Screenshot from 2022-06-15 23-27-10

@Akhilesh64
Copy link
Owner

@nitinkumar070 Please follow the training procedure listed in the repo. I am able to run the training without an issue on google colab following the procedure.
Untitled

@nitinkumar070
Copy link
Author

I am trying to run in my command prompt, with all requirement but some requirement is of updated version. Still i am getting value error.

@nitinkumar070
Copy link
Author

nitinkumar070 commented Jun 17, 2022 via email

@nitinkumar070
Copy link
Author

nitinkumar070 commented Oct 11, 2022 via email

@murdav
Copy link

murdav commented Jun 19, 2023

@nitinkumar070 @Akhilesh64
Did you solve it?
I also have the same exact issue.

I launch the training having num_classes = 3 and not --num_classes 2 as in python main.py *** because I need to predict

loss = Tanimoto_dual_loss()
loss_fn = {'segmentation': loss, 'boundary': loss, 'distance': loss}

@kcsumesh
Copy link

kcsumesh commented Dec 6, 2023

I believe, the error is likely from the inconsistency in the dictionary (key).

In model.py file (line 131), seg, bound and dist keys are used.

model = Model(inputs = input, outputs={'seg': seg, 'bound': bound, 'dist': dist})

In batch_preprocess.py file (line 64-66), segmentation, boundary and distance keys are used.

labels = {'segmentation': np.asarray(seg)}
labels['boundary'] = np.asarray(bound)
labels['distance'] = np.asarray(dist)

In main.py file (line 17), segmentation, boundary and distance keys are used.

losses = {'segmentation': loss, 'boundary': loss, 'distance': loss}

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

4 participants