I would like to integrate my trained object detection model using tensorflow2 object detection api with flask and its Blueprint functionality. The thing is, if I only load 1 model, it works perfectly fine, but if I load more than 2 models, all the models except the last one would throw an error while predicting.
Here's the error message:
Error while reading resource variable batch_normalization_91/gamma_127480 from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/batch_normalization_91/gamma_127480/class tensorflow::Var does not exist.
[[{{node StatefulPartitionedCall/functional_1/batch_normalization_91/ReadVariableOp}}]] [Op:__inference_signature_wrapper_75712]
Function call stack:
signature_wrapper
Package Version:
flask=1.1.2
tensorflow-gpu=2.3.0rc0
OS:
Windows 10
I did google myself for this error, and it seems have to do with the graph or the session which are the concept in tensorflow 1. So I have no idea how to deal with this in tensorflow2. If you need more info, please let me know, thanks.
I would like to integrate my trained object detection model using tensorflow2 object detection api with flask and its Blueprint functionality. The thing is, if I only load 1 model, it works perfectly fine, but if I load more than 2 models, all the models except the last one would throw an error while predicting.
Here's the error message:
Error while reading resource variable batch_normalization_91/gamma_127480 from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/batch_normalization_91/gamma_127480/class tensorflow::Var does not exist. [[{{node StatefulPartitionedCall/functional_1/batch_normalization_91/ReadVariableOp}}]] [Op:__inference_signature_wrapper_75712] Function call stack: signature_wrapper
Package Version:
OS: Windows 10
I did google myself for this error, and it seems have to do with the graph or the session which are the concept in tensorflow 1. So I have no idea how to deal with this in tensorflow2. If you need more info, please let me know, thanks.
Here's the code snippet: