zhuwenxi commented on PR #11326: URL: https://github.com/apache/tvm/pull/11326#issuecomment-1147360798
> Ah I see. You were saying whether the weight is a constant or a var. > > Well, this is not about training or inference mode. Model definition is always separated with the model weight values, so when users convert a model to Relay, weights are vars. Since TVM is mainly for inference, it doesn't make sense to have "training" mode and I don't think it's a problem. > > Meanwhile, Relay allows users to bind parameters with trained weights to let them become constants. You should find the difference when traversing the graph. VarNode and ConstantNode are two different nodes and they are easy to be identified. > > Since this is user options, as a codegen, you have deal with both cases. If weights are vars, then you have to transpose them in runtime; otherwise you could use constant updater to transpose them at compile time. Cool, `bind_params_by_name()` does work! I will upstream my change soon, thank you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
