MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddAssetsTensorsToInputs

Function AddAssetsTensorsToInputs

tensorflow/cc/saved_model/loader.cc:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void AddAssetsTensorsToInputs(const StringPiece export_dir,
164 const std::vector<AssetFileDef>& asset_file_defs,
165 std::vector<std::pair<string, Tensor>>* inputs) {
166 if (asset_file_defs.empty()) {
167 return;
168 }
169 for (auto& asset_file_def : asset_file_defs) {
170 Tensor assets_file_path_tensor = CreateStringTensor(io::JoinPath(
171 export_dir, kSavedModelAssetsDirectory, asset_file_def.filename()));
172 inputs->push_back(
173 {asset_file_def.tensor_info().name(), assets_file_path_tensor});
174 }
175}
176
177// Like Session::Run(), but uses the Make/Run/ReleaseCallable() API to avoid
178// leaving behind non-GC'ed state.

Callers 2

RunInitOpFunction · 0.70
RunRestoreFunction · 0.70

Calls 5

CreateStringTensorFunction · 0.70
nameMethod · 0.65
JoinPathFunction · 0.50
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected