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

ValueError: not enough values to unpack (expected 2, got 1) #5

Open
ssk-28 opened this issue Jun 22, 2022 · 1 comment
Open

ValueError: not enough values to unpack (expected 2, got 1) #5

ssk-28 opened this issue Jun 22, 2022 · 1 comment

Comments

@ssk-28
Copy link

ssk-28 commented Jun 22, 2022

Hello, I am trying to apply the gradcam inspired by your code to my resnet3D model.
I keep getting error while calculating the Gradients in the following line :

conv_outputs, predictions = grad_model(input_pet_io)

error:
ValueError: not enough values to unpack (expected 2, got 1)

I want to know why and how exactly conv_outputs is used in this line ?

thank you ~

@fitushar
Copy link
Owner

fitushar commented Sep 28, 2022

Please check this function on the same script which wraps the ROI CNN model to an expected grad model.

def Get_Build_model(Input_patch_size,Model_weight,Layer_name):

Here is the model architecture that I used for this example: https://github.com/fitushar/3D-GuidedGradCAM-for-Medical-Imaging/blob/09f203cae811476c0f2380894722b20628b97b7e/Resnet_3D.py

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

2 participants