Skip to content

[Topi] Allow relay.nn.dense support arbitrary number dimensions #8412

@AndrewZhaoLuo

Description

@AndrewZhaoLuo

Right now the schedule assumes two dimensions for the input tensor though the documentation suggests otherwise:
https://tvm.apache.org/docs/api/python/relay/nn.html#tvm.relay.nn.dense

Alternatively we can just adjust the documentation to stipulate relay.nn.dense has an input tensor of only two dimensions. However, other frameworks allow their dense layers to be arbitrary number dimensions. E.g. https://pytorch.org/docs/stable/generated/torch.nn.Linear.html#torch.nn.Linear

For forum discussion see: https://discuss.tvm.apache.org/t/relay-nn-does-relay-nn-dense-supports-multi-dimensional-input/10343/5

Metadata

Metadata

Assignees

Labels

topipython/tvm/topi

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions