-
Notifications
You must be signed in to change notification settings - Fork 45.6k
tensorflow.python.framework.errors_impl.InvalidArgumentError: padded_shape[1]=128 is not divisible by block_shape[1]=12 #3695
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
Comments
How can i use the model to predict for bigger image like 720p? |
need i to train using the same size image,like 720p? |
I have resolved it. |
Hi George ... Could you pls elaborate on how to resolved it? I am stuck here! |
|
Did u solve it? I also has the problem |
No, i couldn't |
I met this problem after train deeplab model. will crop the image.
*In detail, if you choose xception, in xception.py: |
it works for the eval.py and vis.py of deeplab!
right:
and the visualize result is crop region of original image which may not be the purpose of the auther. here is a reference about the explaination of the auther: |
@northeastsquare , @muxizju |
what does In detail mean? need to change something ? |
@mohhao Did you figure out what to do with the xception.py file? |
@northeastsquare Can you explain the changes to be maid to xception.py file? |
I think instead of doing this hack you should just set the min_size and max_size flags both to the crop size. And keep the default flag value for preserving the aspect ratio. This will result in scaling the larger dimension to the crop size, then padding to fill the rest. |
*I mean set the flags --min_resize_value=513 |
Please go to Stack Overflow for help and support:
http://stackoverflow.com/questions/tagged/tensorflow
Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
When I run "Jupyter notebook for off-the-shelf inference.",Set the INPUT_SIZE=769 which tell the code to resie the input image.When run the code,error comeout:
Caused by op u'aspp1_depthwise/depthwise/SpaceToBatchND', defined at:
File "mytry.py", line 130, in
model = DeepLabModel(download_path)
File "mytry.py", line 98, in init
tf.import_graph_def(graph_def, name='')
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 553, in import_graph_def
op_def=op_def)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3271, in create_op
op_def=op_def)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1650, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): padded_shape[1]=128 is not divisible by block_shape[1]=12
[[Node: aspp1_depthwise/depthwise/SpaceToBatchND = SpaceToBatchND[T=DT_FLOAT, Tblock_shape=DT_INT32, Tpaddings=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](xception_65/exit_flow/block2/unit_1/xception_module/separable_conv3_pointwise/Relu, aspp1_depthwise/depthwise/SpaceToBatchND/block_shape, aspp1_depthwise/depthwise/SpaceToBatchND/paddings)]]
[[Node: ArgMax/_37 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_1637_ArgMax", tensor_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Can't I process arbitrary size of image?
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
The text was updated successfully, but these errors were encountered: