The 
[doc](https://tvm.apache.org/docs/api/python/relay/nn.html#tvm.relay.nn.dense) 
says `relay.nn.dense` can have input tensors with shape `(d_1, d_2, …, d_n, 
units_in)`. However when I use a 3d tensor as the input of dense, I get this 
error:

```
  File 
"/root/anaconda3/envs/tvm0.8-dev/lib/python3.7/site-packages/tvm-0.8.dev1067+g2cde3dc0e-py3.7-linux-x86_64.egg/tvm/_ffi/_ctypes/packed_func.py",
 line 81, in cfun
    rv = local_pyfunc(*pyargs)
  File 
"/root/anaconda3/envs/tvm0.8-dev/lib/python3.7/site-packages/tvm-0.8.dev1067+g2cde3dc0e-py3.7-linux-x86_64.egg/tvm/relay/op/strategy/generic.py",
 line 726, in _compute_dense
    return [topi_compute(*args)]
  File 
"/root/anaconda3/envs/tvm0.8-dev/lib/python3.7/site-packages/tvm-0.8.dev1067+g2cde3dc0e-py3.7-linux-x86_64.egg/tvm/autotvm/task/topi_integration.py",
 line 162, in wrapper
    node = topi_compute(cfg, *args)
  File 
"/root/anaconda3/envs/tvm0.8-dev/lib/python3.7/site-packages/tvm-0.8.dev1067+g2cde3dc0e-py3.7-linux-x86_64.egg/tvm/topi/x86/dense.py",
 line 215, in dense_pack
    M, K = get_const_tuple(data.shape)  # batch, in_dim
ValueError: too many values to unpack (expected 2)
```

I'm confused. Does `relay.nn.dense` currently only supports 2d tensor as the 
input?





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/relay-nn-does-relay-nn-dense-supports-multi-dimensional-input/10343/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/d034fedadbecc81616e7f26df71b50bcf27a82ab2408464662a0060589e2c3fd).

Reply via email to