when runing below line:
sym, params = relay.frontend.from_tensorflow(graph_def)
I got a “internal invariant was violdated” error.
Error Msg:
fn () {
free_var %BoxPredictor_0/Shape: Tensor[(4,), int32]
%0 = strided_slice(%BoxPredictor_0/Shape, begin=[0], end=[1], strides=[1]) #
%1 = reshape(%0, newshape=[]) #
%2 = expand_dims(%1, axis=0) #
free_var %BoxPredictor_0/stack_1/1: Tensor[(1,), int32]
%3 = expand_dims(%BoxPredictor_0/stack_1/1, axis=0) #
free_var %BoxPredictor_0/stack_1/2: Tensor[(1,), int32]
%4 = expand_dims(%BoxPredictor_0/stack_1/2, axis=0) #
%5 = (%2, %3, %4)
%6 = concatenate(%5) # an internal invariant was violdated whiletypechecking your program[12:20:32] /Users/jialei/github/tvm/src/relay/op/tensor/transform.cc:188: Check failed: e_ndim == ndim (2 vs. 1) relay.concatenate requires all tensors have the same ndim
The same model has no problem to be compiled by nnvm, if I do:
sym, params = nnvm.frontend.from_tensorflow(graph_def)
I appreciate if anyone can hint me about where should I check to get more information for investigation?
1 Like
Same situations here,
tvm._ffi.base.TVMError: [01:47:41] /homed/lidw/git/DaweiLi/tvm/src/relay/op/tensor/transform.cc:187: Check failed: e_ndim == ndim (2 vs. 1) relay.concatenate requires all tensors have the same ndim
Can you guys check if the same model work with NNVM ?
May be the expand_dim 0d aware patch from below might help for relay.
https://github.com/dmlc/tvm/commit/00d509d480ae55def1abccc61742a163dadfab39#diff-3845514369cc735d96dd63a274a21471
There are some patches to be pulled from NNVM to relay frontend. I am working on it.
Thanks,
SIva
The same model works for NNVM, and we are currently using NNVM.
Looking forward to see Relay can also work!
Thanks!
1 Like
@sol401430
Can you check if the below change fix your problem.
master
← srkreddy1238:tf-rebase
opened 09:36AM - 09 Mar 19 UTC
commit 76188a43d062ecf87721f6672dad0d9f714efc6d
Author: Siva <sivar.b@huawei.co… m>
[NNVM][TENSORFLOW] bugfix. (#2444)
commit 6737739c3753f3ebce96b3426de7cd0e546582fa
Author: Ashutosh Parkhi <ashutosh.parkhi@imgtec.com>
[Tensorflow] Support for Crop (#2285)
commit f6c3f9976096de188ed0060b35a4266885513b98
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (#2242)
commit e5d92e1b96c1fbc175be741f522c030f2d91a613
Author: Dominic Symes <36929632+dominicsymes@users.noreply.github.com>
[FRONTEND][TENSORFLOW] Bugfix (#2326)
commit 00d509d480ae55def1abccc61742a163dadfab39
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
[FRONTEND][TENSORFLOW] Support Unstack and Split (#2105)
commit df9d3ad299d550e0f42504fedc149866a87e1c0b
Author: Siva <sivar.b@huawei.com>
[FRONTEND][TENSORFLOW] Bugfix (#2267)
commit d1a0c901067e382f8e4d75a45ab2faeffb86622f
Author: Zhebin Jin <zhebin.jzb@alibaba-inc.com>
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/dmlc/tvm/blob/master/CONTRIBUTORS.md#reviewers).