Open hkvision opened 3 years ago
looks like the model is defined in tf1 api
Seems yes, but it can run with tf2. Can our TF2Estimator accept this? Since we need the internal tf2 whl for performance benefits and thus can't use tf1...
Seems yes, but it can run with tf2. Can our TF2Estimator accept this? Since we need the internal tf2 whl for performance benefits and thus can't use tf1...
How about 1.15.0up3?
Seems yes, but it can run with tf2. Can our TF2Estimator accept this? Since we need the internal tf2 whl for performance benefits and thus can't use tf1...
So it will not be distributed? Or maybe distributed inference only?
As you suggest, we can either:
Seems yes, but it can run with tf2. Can our TF2Estimator accept this? Since we need the internal tf2 whl for performance benefits and thus can't use tf1...
@hkvision , so it works fine with tf2 saved model? It works the same as tf1 model, or any special tutorial for tf2 available? Thanks
Seems yes, but it can run with tf2. Can our TF2Estimator accept this? Since we need the internal tf2 whl for performance benefits and thus can't use tf1...
@hkvision , so it works fine with tf2 saved model? It works the same as tf1 model, or any special tutorial for tf2 available? Thanks
See https://analytics-zoo.readthedocs.io/en/latest/doc/Orca/QuickStart/orca-tf2keras-quickstart.html Currently it supports tf.keras
, and loading from checkpoints.
I tried to convert the graph model to orca-supported keras model. But in the end it didn't work out. The reasons are as follows:
But in the end only get a metaGraph. Metagraph is still a graph and its variable folder is empty. And metagraphs could not be further converted to the models we needed, such as keras.
Unfortunately, lambda does not support output as a graph model. So it's hard to use lambda layer to achieve it.
Therefore, after trying the above two methods and combining fchollet's comments, it can be seen that it is more difficult to convert the graph to a keras model, and the graph model like Dien does not provide the source code, it is hard to build an equivalent Keras model then load into this Keras model since we don't have source code and just have a graph model.
Currently I only see TF2Estimator.from_keras, want to ask is tf graph defined model supported for TF2? Especially we want to run dien: https://github.com/alibaba/ai-matrix/blob/master/macro_benchmark/DIEN_TF2/script/model.py