-
Notifications
You must be signed in to change notification settings - Fork 74
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
input and filter must have the same depth: 4 vs 3 #5
Comments
@tomdawson91 have you solved it? I had the same problem. |
Same issue here! Have anyone solved it? |
img0 = np.float32(img0)[:,:,:3] |
It works! thanks @dattranx |
@dattranx Thanks - as I understand it, this just cuts out the alpha channel |
I get an error like: Status(StatusCode=InvalidArgument, Detail="input and filter must have the same depth: 1 vs 3 Any thoughts on this? for me it is 1 Vs 3 |
I have also met the problem and How you resolved it then? Thank you for your reply. @TD-101 |
@gonzalolc please explain in deep i cannot understood |
I am coding Grad-CAM with keras vis But none of them worked for me
|
The error is because of mismatch in dimensions of the input provided. The model requires a depth of '3' for the input but is given '4'. |
whats depth of 3 means |
It means if you are giving an image, it has 3 channels i.e. size of image is (256,256,3) |
Yes you have to change the depth. |
some one please help |
I'm not an expert, but it seems that the 2 source images I'm using don't have the same number of channels. IE, I'm using PNG files and one set of them has a transparent background (Alpha 0) - Wheras the other set of images has colored backgrounds.. |
Hi,
I get this error / exception, and while it is being, handled, the same error/exception occurs.
I am fairly new to this so it could be a multitude of problems, from the way I have set up python, tf etc, to improper hardware, but I thought I would put it up here in case someone had an easy fix!
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 965, in _do_call
return fn(*args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 947, in _run_fn
status, run_metadata)
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/framework/errors.py", line 450, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors.InvalidArgumentError: input and filter must have the same depth: 4 vs 3
[[Node: import/conv2d0_pre_relu/conv = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/cpu:0"](ExpandDims, import/conv2d0_w)]]
The text was updated successfully, but these errors were encountered: