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

Error when converting inception-v4 from caffe to tensorflow #26

Closed
seanchung2 opened this issue Dec 21, 2017 · 1 comment
Closed

Error when converting inception-v4 from caffe to tensorflow #26

seanchung2 opened this issue Dec 21, 2017 · 1 comment
Assignees
Labels

Comments

@seanchung2
Copy link

Hi,

This is my model: link
When I tried to convert it from IR to tensorflow, an error popped out:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/examples/tensorflow/imagenet_test.py", line 68, in <module>
    tester = TestTF()
  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/examples/tensorflow/imagenet_test.py", line 17, in __init__
    self.input, self.model = self.MainModel.KitModel(self.args.w)
  File "inception_v4.py", line 57, in KitModel
    inception_stem2_7x1_pad = tf.pad(inception_stem2_1x7_relu, paddings = [[0L, 0L], [3L, 3L], [3L, -3L], [0L, 0L]])
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1735, in pad
    result = gen_array_ops._pad(tensor, paddings, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 2927, in _pad
    "Pad", input=input, paddings=paddings, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2958, in create_op
    set_shapes_for_outputs(ret)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2209, in set_shapes_for_outputs
    shapes = shape_func(op)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2159, in call_with_requiring
    return call_cpp_shape_fn(op, require_shape_fn=True)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
    require_shape_fn)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
    raise ValueError(err.message)
ValueError: Paddings must be non-negative for 'Pad_4' (op: 'Pad') with input shapes: [?,73,73,64], [4,2] and with computed input tensors: input[1] = <[0 0][3 3][3 -3][0 0]>.

Does it mean this model is impossible to convert?
Or is there any wrong with the model?

Thank you.

@kitstar
Copy link
Contributor

kitstar commented Dec 21, 2017

Hi @seanchung2 ,

Fixed. Thanks very much.

@kitstar kitstar assigned kitstar and unassigned TobeyQin Dec 21, 2017
@kitstar kitstar closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants