serizba / cppflow

Run TensorFlow models in C++ without installation and without Bazel
https://serizba.github.io/cppflow/
MIT License
787 stars 179 forks source link

Best practice for multiple model instance #159

Closed zhao-lun closed 3 years ago

zhao-lun commented 3 years ago

Hi. thank you for this amazing wrapper for TF2.x.

struct A
{
std::vector<cpp_flow> models;

void make_model(const std::string& path){
        models.emplace_back(std::move(cppflow::model model(path));
}

};

int main()
{
       A;
       A.make_model("abc");
       A.make_model("def");

       return 0;
}

Consider the above snippet, is it fine for multiple model design?

yochananscharf commented 3 years ago

Multiple model serving is probably dependent on TensorFlow and even CUDA internals.