-
第五课最后的代码 def map_nn_linear_op(bb, node_map, node, nn_mod):
x = node_map[node.args[0]]
w = map_param(nn_mod.weight)
if nn_mod.bias is not None:
b = map_param(nn_mod.bias)
y = bb.emit(relax.op.dense(x, w))
return bb.emit(relax.op.add(y, b)) 请问这里的relax.op.dense是在哪里定义的?我在relax仓库里没有找到。这里使用了te.op替代了TE,是不是te.op是用tvm script定义的算子? |
Beta Was this translation helpful? Give feedback.
Answered by
Hzfengsy
Aug 1, 2022
Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
DzAvril
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/mlc-ai/relax/blob/495ac60100efda81a1d507d228a9ada5b9ed7392/python/tvm/relax/op/nn/nn.py#L22