TVMError:
Error(s) have occurred. The program has been annotated with them:
In `main`:
v0.0.3
fn (%input: Tensor[(2, 3), float32], %input1: Tensor[(3, 3), float32]) ->
(Tensor[(5, 3), float32], (Tensor[(2, 3), float32], Tensor[(3, 3), float32])) {
%0 = fn () -> () {
()
};
let %x = ref(%0);
%1 = zeros_like(%input);
%2 = ref(%1);
let %x1 = (%input, %2);
%3 = zeros_like(%input1);
%4 = ref(%3);
let %x2 = (%input1, %4);
%12 = fn (%input2: (Tensor[(2, 3), float32], ref(Tensor[(2, 3),
float32])), %input3: (Tensor[(3, 3), float32], ref(Tensor[(3, 3), float32])))
-> (Tensor[(5, 3), float32], ref(Tensor[(5, 3), float32])) {
let %x4 = (%input2, %input3);
%5 = %x4.0;
let %x5 = concatenate(%5) an internal invariant was violated while
typechecking your program [14:46:32]
/home/rui.huang/tvm0805/include/tvm/node/node.h:285: Check failed:
ref->template is_type<typename SubRef::ContainerType>() || ref->template
derived_from<typename SubRef::ContainerType>(): Downcast from relay.RefType to
relay.TensorType failed.
; an internal invariant was violated while typechecking your program
[14:46:32] /home/rui.huang/tvm0805/include/tvm/node/node.h:285: Check failed:
ref->template is_type<typename SubRef::ContainerType>() || ref->template
derived_from<typename SubRef::ContainerType>(): Downcast from relay.RefType to
relay.TensorType failed.
; an internal invariant was violated while typechecking your program
[14:46:32] /home/rui.huang/tvm0805/include/tvm/node/node.h:285: Check failed:
ref->template is_type<typename SubRef::ContainerType>() || ref->template
derived_from<typename SubRef::ContainerType>(): Downcast from relay.RefType to
relay.TensorType failed.
; ;
%6 = zeros_like(%x5);
let %x6 = ref(%6);
let %x7 = %x^;
%11 = fn () -> () {
let %x9 = %x6^;
%7 = %x4.1 unable to unify: `(Tensor[(3, 3), float32], ref(Tensor[(3,
3), float32]))` and `ref(meta[relay.IncompleteType][0])
// meta data omitted. you can use show_meta_data=True to include meta
data`; ;
let %x10 = %7^;
%8 = %x4.1 unable to unify: `(Tensor[(3, 3), float32], ref(Tensor[(3,
3), float32]))` and `ref(meta[relay.IncompleteType][0])
// meta data omitted. you can use show_meta_data=True to include meta
data`; ;
%9 = concatenate_grad(%x9, meta[relay.attrs.SplitAttrs][0]);
%10 = add(%x10, %9);
let %x11 = (%8 := %10);
%x7()
};
let %x8 = (%x := %11);
(%x5, %x6)
};
let %x3 = %12(%x1, %x2);
%13 = %x3.1;
%14 = %x3.0;
%15 = ones_like(%14);
let %x12 = (%13 := %15);
%16 = %x^;
let %x13 = %16();
%17 = %x3.0;
%18 = %x1.1;
%19 = %18^;
%20 = %x2.1;
%21 = %20^;
%22 = (%19, %21);
(%17, %22)
}
// meta data omitted. you can use show_meta_data=True to include meta data
Process finished with exit code 1
The relay.concatenate could complete the forward operations,but the error log
shows:
`%12 = fn (%input2: (Tensor[(2, 3), float32], ref(Tensor[(2, 3), float32])),
%input3: (Tensor[(3, 3), float32], ref(Tensor[(3, 3), float32]))) ->
(Tensor[(5, 3), float32], ref(Tensor[(5, 3), float32]))`
In the process of reverse calculation, What I passed in the backward is a
parameter of type Tensor, why would TVM construct a Tuple as a parameter? And
TVM can't downcast it to tensor type?
---
[Visit
Topic](https://discuss.tvm.ai/t/relay-concatenate-downcast-from-relay-reftype-to-relay-tensortype-failed/3595/5)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.ai/email/unsubscribe/ad217b7f8ba75f1ea284e433439b743959891aaa089b9090296d9c2da7faa84c).
Tianqi Chen, UW, Seattle, WA, 98105, United States
http://tracking.discuss.tvm.ai/tracking/unsubscribe?msgid=8vuDdWIrl1vifYqGeiYXmw2