Closed anshkumar closed 3 years ago
Tagging @arashwan if he knows what's going on.
Export module needs to be written for deepmac since the model is built differently than models under main beta folder. We build the maskrcnn model here https://github.com/tensorflow/models/blob/master/official/vision/beta/serving/detection.py#L44 using the main factory function. If you want to export deepmac, you will need to build the model using deepmac model builder instead.
For installing tensorflow_text on gpu, I am tagging @saberkun
For TF-text, I contact with TF-text team. The tf-text default setup.py should be GPU and to install CPU they can do pip install tensorflow-text[tensorflow_cpu], but if this is an old version of tensorflow text and the default is CPU, they can use pip install tensorflow-text[tensorflow_gpu] if worse comes to worse; just install tensorflow-text, and then install whatever version of tensorflow they want after.
In the current head of the master branch, we added try-except to the tf-text usage, so the error should not happen after that.
@arashwan @vighneshbirodkar added the export script in this PR. The majority of the code is same as in https://github.com/tensorflow/models/blob/master/official/vision/beta/serving ,just updated it with deepmac model. This fixes the current export issue.
We have approved the PR and merged it to master. Thanks for your contribution.
I'm trying to export the trained DeepMAC model for serving. I'm using following command:
But I'm getting following error:
I don't understand why I need to have
tensorflow_text
for a vision model.I tried installing tensorflow_text, but then it also installing tensorflow (CPU) with it, but I use GPU version. What to do ?
I'm guessing this export script was not tested with deepmac. So, in the
export_saved_model.py
, I commented thenlp
imports and added following line:I'm trying to export maskrcnn_deepmac with spinenet49 backbone. But I'm getting following error: