serizba / cppflow

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

Best practice for multiple model instance #159

Closed zhao-lun closed 2 years ago

zhao-lun commented 2 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 2 years ago

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