Advertisement
TylerHumanCompiler

envelopecnn.h

Jul 9th, 2020
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <stdlib.h>
  4. #include <math.h>
  5. #include <tensorflow/cc/saved_model/loader.h>
  6. #include <tensorflow/core/protobuf/saved_object_graph.pb.h>
  7. #include <tensorflow/core/public/session.h>
  8. #include <tensorflow/core/public/session_options.h>
  9. #include <tensorflow/cc/saved_model/tag_constants.h>
  10.  
  11.  
  12. class EnvelopeCNN {
  13. private:
  14.     typedef std::vector<std::pair<std::string, tensorflow::Tensor>> tensor_dict;
  15.     tensorflow::Status status;
  16.     tensorflow::Session *session;
  17.     tensorflow::SavedModelBundle model;
  18.     tensorflow::GraphDef graph_def;
  19.  
  20. public:
  21.     EnvelopeCNN(std::string modelpath, std::string graphpath);
  22.     void predict(float**** inp);
  23.     ~EnvelopeCNN();
  24.  
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement