tensorflow_cpp 1.0.6
|
Utility functions for SavedModels. More...
#include <algorithm>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
#include <tensorflow/cc/saved_model/loader.h>
#include <tensorflow/cc/saved_model/tag_constants.h>
#include <tensorflow_cpp/utils.h>
Go to the source code of this file.
Namespaces | |
namespace | tensorflow_cpp |
Namespace for tensorflow_cpp library. | |
Functions | |
tf::SavedModelBundleLite | tensorflow_cpp::loadSavedModel (const std::string &dir, const bool allow_growth=true, const double per_process_gpu_memory_fraction=0, const std::string &visible_device_list="") |
Loads a TensorFlow SavedModel from a directory into a new session. | |
tf::Session * | tensorflow_cpp::loadSavedModelIntoNewSession (const std::string &dir, const bool allow_growth=true, const double per_process_gpu_memory_fraction=0, const std::string &visible_device_list="") |
Loads a TensorFlow SavedModel from a directory into a new session. | |
tf::Session * | tensorflow_cpp::getSessionFromSavedModel (const tf::SavedModelBundleLite &saved_model) |
Returns the session that a SavedModel is loaded in. | |
std::string | tensorflow_cpp::getSavedModelNodeByLayerName (const tf::SavedModelBundleLite &saved_model, const std::string &layer_name, const std::string &signature="serving_default") |
Determines the node name from a SavedModel layer name. | |
std::string | tensorflow_cpp::getSavedModelLayerByNodeName (const tf::SavedModelBundleLite &saved_model, const std::string &node_name, const std::string &signature="serving_default") |
Determines the layer name from a SavedModel node name. | |
std::vector< std::string > | tensorflow_cpp::getSavedModelInputNames (const tf::SavedModelBundleLite &saved_model, const bool layer_names=false, const std::string &signature="serving_default") |
Determines the names of the SavedModel input nodes. | |
std::vector< std::string > | tensorflow_cpp::getSavedModelOutputNames (const tf::SavedModelBundleLite &saved_model, const bool layer_names=false, const std::string &signature="serving_default") |
Determines the names of the SavedModel output nodes. | |
std::vector< int > | tensorflow_cpp::getSavedModelNodeShape (const tf::SavedModelBundleLite &saved_model, const std::string &node_name, const std::string &signature="serving_default") |
Determines the shape of a given SavedModel node. | |
tf::DataType | tensorflow_cpp::getSavedModelNodeType (const tf::SavedModelBundleLite &saved_model, const std::string &node_name, const std::string &signature="serving_default") |
Determines the datatype of a given SavedModel node. | |
std::string | tensorflow_cpp::getSavedModelInfoString (const tf::SavedModelBundleLite &saved_model) |
Utility functions for SavedModels.
Definition in file saved_model_utils.h.