/external/tensorflow/tensorflow/lite/python/ |
D | convert_saved_model_test.py | 40 saved_model_dir = os.path.join(self.get_temp_dir(), "simple_savedmodel") 46 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 47 return saved_model_dir 51 saved_model_dir = os.path.join(self.get_temp_dir(), "simple_savedmodel") 60 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 61 return saved_model_dir 79 saved_model_dir, argument 91 saved_model_dir=saved_model_dir, 101 saved_model_dir = self._createSimpleSavedModel(shape=[1, 16, 16, 3]) 102 _, in_tensors, out_tensors = self._convertSavedModel(saved_model_dir) [all …]
|
D | tflite_convert_test.py | 227 saved_model_dir = self._getFilepath('model') 235 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 237 flags_str = '--saved_model_dir={}'.format(saved_model_dir) 268 saved_model_dir = self._getFilepath('model') 272 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 273 return (saved_model_dir, custom_opdefs_str) 276 saved_model_dir, _ = self._createSavedModelWithCustomOp() 280 '--experimental_new_converter'.format(saved_model_dir)) 284 saved_model_dir, custom_opdefs_str = self._createSavedModelWithCustomOp() 289 '--experimental_new_converter'.format(saved_model_dir, [all …]
|
D | lite.py | 531 self.saved_model_dir = None 684 if self.saved_model_dir: 686 "saved_model_dir": self.saved_model_dir, 710 self.saved_model_dir = None 712 if self.saved_model_dir: 715 _parse_saved_model_with_debug_info(self.saved_model_dir)) 719 self.saved_model_dir = None 723 self.saved_model_dir = None 730 self.saved_model_dir = None 969 def _load_saved_model(self, saved_model_dir, saved_model_tags): argument [all …]
|
D | lite_v2_test.py | 360 saved_model_dir = os.path.join(self.get_temp_dir(), 'qat_float_ops_at_end') 369 model.save(saved_model_dir) 370 return saved_model_dir 373 saved_model_dir = self._createV2QATSavedModelWithFloatOpsAtEnd() 374 converter = lite.TFLiteConverterV2.from_saved_model(saved_model_dir) 1358 saved_model_dir = os.path.join(self.get_temp_dir(), 'simple_savedmodel') 1370 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 1371 return saved_model_dir 1375 saved_model_dir = os.path.join(self.get_temp_dir(), 'saved_model') 1385 model.save(saved_model_dir) [all …]
|
D | convert_saved_model.py | 45 def get_meta_graph_def(saved_model_dir, tag_set): argument 59 return loader.load(sess, tag_set, saved_model_dir) 155 def freeze_saved_model(saved_model_dir, input_arrays, input_shapes, argument 187 meta_graph = get_meta_graph_def(saved_model_dir, tag_set) 198 loader.load(sess, meta_graph.meta_info_def.tags, saved_model_dir)
|
D | metrics_nonportable_test.py | 247 saved_model_dir = os.path.join(self.get_temp_dir(), 'simple_savedmodel') 259 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 260 return saved_model_dir 263 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 264 converter = lite.TFLiteSavedModelConverter(saved_model_dir, set(['serve']), 281 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 283 converter = lite.TFLiteConverterV2.from_saved_model(saved_model_dir) 306 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 308 converter = lite.TFLiteConverterV2.from_saved_model(saved_model_dir) 320 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) [all …]
|
/external/tensorflow/tensorflow/python/tools/ |
D | saved_model_utils_test.py | 42 saved_model_dir = os.path.join(test.get_temp_dir(), "valid_saved_model") 43 builder = saved_model_builder.SavedModelBuilder(saved_model_dir) 49 actual_saved_model_pb = saved_model_utils.read_saved_model(saved_model_dir) 57 saved_model_dir = os.path.join(test.get_temp_dir(), "invalid_saved_model") 59 IOError, "SavedModel file does not exist at: %s" % saved_model_dir): 60 saved_model_utils.read_saved_model(saved_model_dir) 63 saved_model_dir = os.path.join(test.get_temp_dir(), "test_tags") 64 builder = saved_model_builder.SavedModelBuilder(saved_model_dir) 106 actual_tags = saved_model_utils.get_saved_model_tag_sets(saved_model_dir) 112 saved_model_dir = os.path.join(test.get_temp_dir(), "test_invalid_tags") [all …]
|
D | saved_model_utils.py | 27 def read_saved_model(saved_model_dir): argument 41 compat.as_bytes(saved_model_dir), 45 compat.as_bytes(saved_model_dir), 51 raise IOError("SavedModel file does not exist at: %s" % saved_model_dir) 73 (saved_model_dir, constants.SAVED_MODEL_FILENAME_PBTXT, 77 def get_saved_model_tag_sets(saved_model_dir): argument 87 saved_model = read_saved_model(saved_model_dir) 94 def get_meta_graph_def(saved_model_dir, tag_set): argument 113 saved_model = read_saved_model(saved_model_dir)
|
D | saved_model_cli.py | 62 def _show_tag_sets(saved_model_dir): argument 70 tag_sets = saved_model_utils.get_saved_model_tag_sets(saved_model_dir) 76 def _show_signature_def_map_keys(saved_model_dir, tag_set): argument 88 signature_def_map = get_signature_def_map(saved_model_dir, tag_set) 138 def _show_inputs_outputs(saved_model_dir, tag_set, signature_def_key, indent=0): argument 151 meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir, 177 def _show_defined_functions(saved_model_dir): argument 183 meta_graphs = saved_model_utils.read_saved_model(saved_model_dir).meta_graphs 191 trackable_object = load.load(saved_model_dir) 293 def _show_all(saved_model_dir): argument [all …]
|
D | saved_model_cli_test.py | 178 saved_model_dir = os.path.join(test.get_temp_dir(), 'dummy_model') 183 save.save(dummy_model, saved_model_dir) 185 args = self.parser.parse_args(['show', '--dir', saved_model_dir, '--all']) 262 saved_model_dir = os.path.join(test.get_temp_dir(), 'dummy_model') 264 save.save(dummy_model, saved_model_dir) 266 args = self.parser.parse_args(['show', '--dir', saved_model_dir, '--all']) 801 saved_model_dir = os.path.join(test.get_temp_dir(), 'dummy_model') 807 save.save(dummy_model, saved_model_dir, signatures={'func': func}) 812 'aot_compile_cpu', '--dir', saved_model_dir, '--tag_set', 'serve', 855 saved_model_dir = os.path.join(test.get_temp_dir(), 'dummy_model') [all …]
|
/external/tensorflow/tensorflow/core/tfrt/saved_model/tests/ |
D | saved_model_test.cc | 50 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST_P() local 64 SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TEST_P() 100 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST() local 109 SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TEST() 142 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST() local 145 TFRTSavedModelTest test(saved_model_dir); in TEST() 169 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST() local 178 SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TEST() 218 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST() local 226 SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TEST() [all …]
|
D | saved_model_gpu_test.cc | 33 std::string saved_model_dir = tensorflow::GetDataDependencyFilepath( in TEST() local 44 SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TEST()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | freeze_saved_model_assets.cc | 43 explicit FreezeAssetsPass(std::string saved_model_dir) { in FreezeAssetsPass() 44 this->saved_model_dir = saved_model_dir; in FreezeAssetsPass() 50 std::string saved_model_dir; member 91 tensorflow::io::JoinPath(saved_model_dir, asset_filename); in runOnOperation() 115 std::string saved_model_dir) { in CreateFreezeAssetsPass() argument 116 return std::make_unique<FreezeAssetsPass>(saved_model_dir); in CreateFreezeAssetsPass()
|
D | init_text_file_to_import.cc | 47 explicit InitTextFileToImportPass(std::string saved_model_dir) { in InitTextFileToImportPass() argument 48 saved_model_dir_ = saved_model_dir; in InitTextFileToImportPass() 59 StringRef saved_model_dir) in ConvertInitializeTableFromTextFileV2() argument 61 saved_model_dir_(saved_model_dir) {} in ConvertInitializeTableFromTextFileV2() 155 std::string saved_model_dir) { in CreateInitTextFileToImportPass() argument 156 return std::make_unique<InitTextFileToImportPass>(saved_model_dir); in CreateInitTextFileToImportPass()
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
D | tf_trt_integration_test_base.py | 376 def _RunGraphV1(self, saved_model_dir, inputs_data, config, num_runs=2): argument 383 loader.load(sess, [tag_constants.SERVING], saved_model_dir) 402 def _RunGraphV2(self, saved_model_dir, inputs_data, graph_state, num_runs=2): argument 405 root = load.load(saved_model_dir) 440 saved_model_dir, argument 451 results = self._RunGraphV2(saved_model_dir, inputs_data, graph_state, 463 return self._RunGraphV1(saved_model_dir, inputs_data, config, num_runs) 465 def _CreateConverter(self, run_params, saved_model_dir, conversion_params): argument 469 input_saved_model_dir=saved_model_dir, 478 input_saved_model_dir=saved_model_dir, [all …]
|
D | tf_function_test.py | 208 saved_model_dir = trt_test.TfTrtIntegrationTestBase._MakeSavedModelV1( 210 saved_model_proto = loader_impl.parse_saved_model(saved_model_dir) 218 old_saved_model_file = os.path.join(saved_model_dir, 223 compat.as_bytes(saved_model_dir), 227 return saved_model_dir 242 saved_model_dir = trt_test.TfTrtIntegrationTestBase._MakeSavedModelV2( 244 saved_model_proto = loader_impl.parse_saved_model(saved_model_dir) 257 old_saved_model_file = os.path.join(saved_model_dir, 262 compat.as_bytes(saved_model_dir), 266 return saved_model_dir
|
/external/tensorflow/tensorflow/core/tfrt/saved_model/ |
D | saved_model.cc | 132 mlir::Operation* bound_input, absl::string_view saved_model_dir, in CreateTensorFromBoundInput() argument 140 tensorflow::io::JoinPath(saved_model_dir, asset.filename().str())); in CreateTensorFromBoundInput() 148 absl::string_view saved_model_dir, mlir::ModuleOp module) { in GetFunctionSignaturesFromTFSavedModelMLIR() argument 154 module, [&status_group, &variables, &signatures, saved_model_dir]( in GetFunctionSignaturesFromTFSavedModelMLIR() 181 bound_input, saved_model_dir, &variables); in GetFunctionSignaturesFromTFSavedModelMLIR() 305 const FallbackState& fallback_state, std::string saved_model_dir, in ImportSavedModel() argument 312 LOG(WARNING) << "No valid signature found for model: " << saved_model_dir; in ImportSavedModel() 341 saved_model_functionalization_time_seconds->GetCell(saved_model_dir) in ImportSavedModel() 344 saved_model_grappler_time_seconds->GetCell(saved_model_dir) in ImportSavedModel() 351 mlir::ModuleOp module, absl::string_view saved_model_dir) { in GetInitializersAndSignatures() argument [all …]
|
D | saved_model_testutil.cc | 72 TFRTSavedModelTest::TFRTSavedModelTest(const std::string& saved_model_dir) in TFRTSavedModelTest() argument 73 : TFRTSavedModelTest(saved_model_dir, in TFRTSavedModelTest() 77 const std::string& saved_model_dir, in TFRTSavedModelTest() argument 84 saved_model_ = SavedModelImpl::LoadSavedModel(options, saved_model_dir, in TFRTSavedModelTest() 93 void ComputeCurrentTFResult(const std::string& saved_model_dir, in ComputeCurrentTFResult() argument 112 saved_model_dir, in ComputeCurrentTFResult() 136 void ComputeCurrentTFResult(const std::string& saved_model_dir, in ComputeCurrentTFResult() argument 144 ComputeCurrentTFResult(saved_model_dir, signature_name, input_names, inputs, in ComputeCurrentTFResult() 198 GetWarmupRequests(absl::string_view saved_model_dir) { in GetWarmupRequests() argument 201 absl::StrCat(saved_model_dir, kWarmupRequestsRelativePath); in GetWarmupRequests()
|
D | saved_model_testutil.h | 47 explicit TFRTSavedModelTest(const std::string& saved_model_dir); 48 TFRTSavedModelTest(const std::string& saved_model_dir, 85 void ComputeCurrentTFResult(const std::string& saved_model_dir, 98 void ComputeCurrentTFResult(const std::string& saved_model_dir, 116 GetWarmupRequests(absl::string_view saved_model_dir);
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | tf_mlir_translate.cc | 153 absl::string_view saved_model_dir, in SavedModelObjectGraphToMlirImport() argument 159 std::string(saved_model_dir.data(), saved_model_dir.length()), &bundle); in SavedModelObjectGraphToMlirImport() 161 LOG(ERROR) << "Failed to load saved model '" << saved_model_dir in SavedModelObjectGraphToMlirImport() 177 absl::string_view saved_model_dir, in SavedModelSignatureDefsToMlirImport() argument 196 session_options, /* run_options = */ {}, std::string(saved_model_dir), in SavedModelSignatureDefsToMlirImport() 199 LOG(ERROR) << "Failed to load saved model v1 '" << saved_model_dir in SavedModelSignatureDefsToMlirImport() 214 absl::string_view saved_model_dir, in SavedModelSignatureDefsToMlirImportLite() argument 219 auto status = ReadMetaGraphDefFromSavedModel(std::string(saved_model_dir), in SavedModelSignatureDefsToMlirImportLite() 222 LOG(ERROR) << "Failed to load saved model v1 '" << saved_model_dir in SavedModelSignatureDefsToMlirImportLite()
|
/external/tensorflow/tensorflow/lite/python/metrics/ |
D | metrics_nonportable_test.py | 247 saved_model_dir = os.path.join(self.get_temp_dir(), 'simple_savedmodel') 259 saved_model.simple_save(sess, saved_model_dir, inputs, outputs) 260 return saved_model_dir 263 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 264 converter = lite.TFLiteSavedModelConverter(saved_model_dir, set(['serve']), 281 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 283 converter = lite.TFLiteConverterV2.from_saved_model(saved_model_dir) 306 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) 308 converter = lite.TFLiteConverterV2.from_saved_model(saved_model_dir) 320 saved_model_dir = self._createV1SavedModel(shape=[1, 16, 16, 3]) [all …]
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/model_tests/ |
D | run_models.py | 102 def __init__(self, saved_model_dir: str, saved_model_tags: Sequence[str], 113 saved_model_dir=saved_model_dir, 165 model_name = os.path.split(manager.model_config.saved_model_dir)[-1] 230 saved_model_dir=FLAGS.saved_model_dir,
|
D | model_handler.py | 115 saved_model_dir: str, saved_model_tags: str, 122 export_dir=saved_model_dir, 137 def load_graph_func(saved_model_dir: str, saved_model_tags: str, 141 export_dir=saved_model_dir, tags=saved_model_tags) 155 saved_model_dir: str, 161 cls).__new__(cls, saved_model_dir, saved_model_tags, 267 saved_model_dir=self.model_config.saved_model_dir, 337 saved_model_dir=self.model_config.saved_model_dir, 444 saved_model_dir=output_saved_model_dir) 454 input_saved_model_dir=self.model_config.saved_model_dir, [all …]
|
/external/tensorflow/tensorflow/c/experimental/saved_model/core/revived_types/ |
D | asset.cc | 33 const std::string& saved_model_dir, in Create() argument 37 io::JoinPath(saved_model_dir, kSavedModelAssetsDirectory, asset_filename); in Create()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/ |
D | tf_tfl_passes.h | 34 void AddTFToTFLConversionPasses(llvm::StringRef saved_model_dir, 50 llvm::StringRef saved_model_dir, const toco::TocoFlags& toco_flags,
|