Skip to content

Instantly share code, notes, and snippets.

@dneprDroid
Last active November 4, 2019 15:58
Show Gist options
  • Save dneprDroid/53fbd4d18b538cc31686d3a65ba7ddc1 to your computer and use it in GitHub Desktop.
Save dneprDroid/53fbd4d18b538cc31686d3a65ba7ddc1 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