Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sachaarbonel/ba78a0c4df5f63dd0eba5150968474b1 to your computer and use it in GitHub Desktop.
Save sachaarbonel/ba78a0c4df5f63dd0eba5150968474b1 to your computer and use it in GitHub Desktop.
#include <GraphDefDecryptor.hpp>
........
tensorflow::GraphDef graph;
// Decryption:
const std::string key = "JHEW8F7FE6F8E76W8F687WE6F8W8EF5";
auto status = tfsecured::GraphDefDecryptAES(path, // path to *.pb file (encrypted graph)
&graph,
key); // your key
if (!status.ok()) {
std::cout << status.error_message() << std::endl;
return;
}
// Create session :
std::unique_ptr<Session> session(NewSession(options));
status = session->Create(graph);
// Run session ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment