| 161 | } |
| 162 | |
| 163 | void 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. |
no test coverage detected