-
-
Notifications
You must be signed in to change notification settings - Fork 39
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 in get_salient_feature_mask #1
Comments
Hi, can you share here the input received by get_salient_feature_mask? |
Could you follow the link https://colab.research.google.com/drive/1jGEyL-YI2GN2t09nlNMmofZLiA-nnJKE?usp=sharing ? you mean layer_outs = functor([img.reshape(1, 66, 200, 3)]) |
Hi, In your code for get_model(), you have commented out the first layer(normalization layer) #model.add(Lambda(lambda x: x /127.5 - 1.0, input_shape = (utils.IMG_HT, utils.IMG_WIDTH, utils.IMG_CH))) that in turn changes the layer numbers and it's significant for below code: outputs = [layer.output for layer in model.layers][1:6] In your case change "outputs = [layer.output for layer in model.layers][1:6]" to "outputs = [layer.output for layer in model.layers][0:5]" and it'll work. |
I got an error AttributeError: module 'tensorflow' has no attribute 'Session' site:stackoverflow.com and change line: And I have this error: in get_salient_feature_mask(ops) IndexError: list index out of range Should be related to commented out the first layer again? |
Hello there,
I have executed your code in colab, but I have problems following the get_salient_feature_mask function. At the beginning of the loop, avg_actvn = np.mean (layer, axis = 3) .squeeze (axis = 0) returns this error
AxisError: axis 3 is out of bounds for array of dimension 2
Do you know why?
The text was updated successfully, but these errors were encountered: