[FRONTEND][TENSORFLOW] Add extra_param to from_tensorflow#8556
[FRONTEND][TENSORFLOW] Add extra_param to from_tensorflow#8556jcf94 wants to merge 6 commits intoapache:mainfrom
Conversation
|
@leandron - is there a need to check this usage via tvmc as well if this changes ? |
Re-triggle CI
|
AFAIK, other frontends also have the similar issue. For example, ONNX graph also put some shapes to the model parameters, but their constant values are maintained in the model artifacts when the model is frozen, so it may just need
It seems to me that the above flow should result in the same outcome without this PR (assuming |
|
Thanks to all! |
In some graph, for example:
We have input placeholder
batch_sizewhose value would be used to determine the shape of another op. Even though the shape of tensor_a can be specified throughfrom_tensorflow(shape=(...))and in this case the batch_size value must be a fixed number, we cannot process this as a static graph.This PR adds an extra parameter to
from_tensorflow, that we can manually fix a tensor to be a constant value, then the graph can be processed as a static graph.