Standard Tensorflow models exported in TF 1.12 & later have newer ops which have not been implemented in TVM right now.
VariableV2: I guess TF has deprecated Variable and moved to variable2. I am not 100% sure though. Here is the link
TruncatedNormal
Assign
I havent encountered any other non supported op. Want to know whats the way forward ?
Traceback (most recent call last):
File "tvm_basic_infra_testing.py", line 106, in <module>
net, params = tvm.relay.frontend.from_tensorflow(graph_def, shape={'input':input_shape}, layout=layout)
File "/tvm/python/tvm/relay/frontend/tensorflow.py", line 2182, in from_tensorflow
sym, params = g.from_tensorflow(graph, layout, shape, outputs)
File "/tvm/python/tvm/relay/frontend/tensorflow.py", line 1700, in from_tensorflow
"The following operators are not implemented: {}".format(missing_operators))
NotImplementedError: The following operators are not implemented: {'TruncatedNormal', 'Assign', 'VariableV2'}
@srkreddy1238 I can take up this, for the ops ( TruncatedNormal', 'Assign', 'VariableV2', 'PlaceholderWithDefault'), but I don’t have a timeline at this point since I am working on something else.
@JDanielWu
For FIFOQueueV2, you can just map it to a dummy implementation, we met it before
For RandomUniform, we can add the support (welcome to contribute), but looks it is not related to inference. For both RandomUniform and QueueDequeueUpToV2, not sure if they can be removed during freezing or mapped to dummy impl.
I have the same issue, I tried tensorflow version 1.11.0 and 1.9.0 still I’m facing the same issue. Can you please tell me up to which version of tensorflow is tvm support available.
@kingman21 Which operators are your referring to ?
Tensorflow version is not a major difference here (at least up to < TF 2.0).
Tensorflow has got huge operators used across training and inference and TVM implement a part of these based on the need. TVM now covers most of operators needed for vision official slim models released by Tensorflow.
We are considering ( TruncatedNormal', 'Assign', 'VariableV2', 'PlaceholderWithDefault'), immediately as these are modified/upgraded versions of existing operators.
You are welcome to report the unsupported operators and contribute as well to improve tensorflow frontend in TVM.
When I try a nlp model ,The following operators are not implemented: ‘RandomUniform’.
I’m trying to define function myself,but the return value error.Can you take a look at it for me?
The return value cannot be np.array, it must be node?
I tried this approch and able to run the code, but this gives rise to different error, where my model is having output.shape of (1,4) now if the check the model after importing random_uniform it changes my model output to shape of (1,15.512). Not sure where its changing the graph output
There is something wrong with my code. for example, When ‘RandomUniform’ is in a loop, the shape keeps changing… If your shape of ‘RandomUniform’ doesn’t change, you can print shape or inputs[0] on _random_uniform.
If there is any discovery, welcome timely feedback.
When the tvm function gets the random_unifrorm variable in graph, it will not process the next elements in the graph. So its having a different shape as output.
Also, I have checked the params return value which is having like 70% of the graph in that.
I didn’t quite catch your meaning…We only need to make sure that the input and output of random_unifrorm op are correct. If random_unifrorm op is ok, we check again why did the model output changed
@heliqi i thing the code for random_uniform is working fine because it gives me correct output shape. before that what type of model you have tried for this. because i have been trying to import lstm to tensorflow frontend. So i get random_uniform in this way.