aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/saved_model
Commit message (Collapse)AuthorAge
* Updating function and class tf_export decorators for endpoints according toGravatar Anna R2018-10-01
| | | | | | | | | | | https://github.com/tensorflow/community/pull/16. In addition to the changes in the doc, I made the following updates (these changes make sense to me and I didn't notice them when compiling the doc): * deprecate saved_model.builder.SavedModelBuilder - replaced with saved_model.SavedModelBuilder * deprecate python_io.tf_record_iterator - replaced with io.tf_record_iterator * deprecate python_io.TFRecordWriter - replaced with io.TFRecordWriter * move reduce_join to tf.string PiperOrigin-RevId: 215253944
* Updating the V2 variables API.Gravatar Alexandre Passos2018-09-27
| | | | PiperOrigin-RevId: 214824023
* Update documentation for SavedModel tags.Gravatar Christina Sorokin2018-09-11
| | | | PiperOrigin-RevId: 212582822
* Remove unused and non public get_signature_def* methods from ↵Gravatar A. Unique TensorFlower2018-09-06
| | | | | | saved_model/signature_def_utils PiperOrigin-RevId: 211858972
* Simplify logic that defaults to the default graph when no graph is passed ↵Gravatar A. Unique TensorFlower2018-08-27
| | | | | | into saved_models.utils.get_tensor_from_tensor_info PiperOrigin-RevId: 210417762
* Move from deprecated self.test_session() to self.session() when a graph is set.Gravatar A. Unique TensorFlower2018-08-21
| | | | | | self.test_session() has been deprecated in cl/208545396 as its behavior confuses readers of the test. Moving to self.session() instead. PiperOrigin-RevId: 209696110
* Refactor out path concatenation in the SavedModelBuilder.Gravatar Katherine Wu2018-08-09
| | | | PiperOrigin-RevId: 208094190
* Create a save_model and load_model util to support saving keras.Model ↵Gravatar A. Unique TensorFlower2018-07-27
| | | | | | to/from checkpoint. Currently, the model topology is still loaded from json (placed under saved_model/assets). Later, we will load from saved_model.pb. PiperOrigin-RevId: 206412614
* Add estimator in contrib that loads its model function from a SavedModel.Gravatar Katherine Wu2018-07-25
| | | | PiperOrigin-RevId: 206048542
* The SavedModel legacy_init_op and main_op are functionally equivalent. Here, ↵Gravatar Karmel Allison2018-07-25
| | | | | | we remove duplicated code paths by mapping legacy_init_op into main_op in the SavedModelBuilder, and we deprecate the legacy_init_op arg. Note that the loader will still look for both, so old SavedModels will still load without trouble. PiperOrigin-RevId: 206026743
* Automated rollback of commit 568727eed199dba04e37f500265b50f96fed455eGravatar Nick Felt2018-07-24
| | | | PiperOrigin-RevId: 205875586
* Add v2 summary support to Estimator.train() and MonitoredSession hooksGravatar Nick Felt2018-07-24
| | | | | | | | | | | | | This change makes Estimator.train() support v2 summaries (tf.contrib.summary.*) out-of-the-box, to match the support for v1 summaries. Estimator.train() will now handle the boilerplate necessary to initialize a file writer and enable summary writing every N steps, and will ensure that its own automatically exported summaries (for loss and global_step/sec) get written to the same underlying events file. As part of this change, tf.train.SummarySaverHook, tf.train.CheckpointSaverHook, tf.train.StepCounterHook, and tf.train.ProfilerHook have also been adapted to write summaries using the v2 summary system (via a compatibility layer), instead of using FileWriterCache. A couple additional smaller changes are: - the 'session' parameter to FileWriter() can now be a callable returning a tf.Session instance. - the introduction of tf.contrib.summary.record_summaries_if() which takes a boolean tensor for direct control of tf.contrib.summary.should_record_summaries(). - EstimatorSpec.train_op, besides a tf.Operation, is now allowed to be any Tensor-equivalent object rather than just a tf.Tensor. PiperOrigin-RevId: 205843986
* Automated rollback of commit cf94a46c34f8568608d78b77e9a1c4369ebcafa2Gravatar Karmel Allison2018-07-23
| | | | PiperOrigin-RevId: 205746329
* The SavedModel legacy_init_op and main_op are functionally equivalent. Here, ↵Gravatar Karmel Allison2018-07-23
| | | | | | we remove duplicated code paths by mapping legacy_init_op into main_op in the SavedModelBuilder, and we deprecate the legacy_init_op arg. Note that the loader will still look for both, so old SavedModels will still load without trouble. PiperOrigin-RevId: 205728344
* Automated rollback of commit 8257891f378027a1a7c0403ba6ba0aeb313496a0Gravatar Katherine Wu2018-07-20
| | | | PiperOrigin-RevId: 205466000
* Add estimator in contrib that loads its model function from a SavedModel.Gravatar Katherine Wu2018-07-20
| | | | PiperOrigin-RevId: 205449314
* Refactor loader.load function into a class that splits the graph loading and ↵Gravatar Katherine Wu2018-06-19
| | | | | | variable restoration steps. PiperOrigin-RevId: 201268712
* Automated g4 rollback of changelist 200747752Gravatar Katherine Wu2018-06-15
| | | | PiperOrigin-RevId: 200802842
* Refactor loader.load function into a class that splits the graph loading and ↵Gravatar Katherine Wu2018-06-15
| | | | | | variable restoration steps. PiperOrigin-RevId: 200747752
* Automated g4 rollback of changelist 200467580Gravatar A. Unique TensorFlower2018-06-14
| | | | PiperOrigin-RevId: 200525639
* Uses a resource variable by default for the global step.Gravatar Alexandre Passos2018-06-13
| | | | PiperOrigin-RevId: 200467580
* Apply import_scope to asset and variable tensors during ↵Gravatar A. Unique TensorFlower2018-06-12
| | | | | | | | tf.saved_model.loader.load This change explicitly declares import_scope as a kwarg for tf.saved_model.loader.load. Previously, tf.saved_model.loader.load implicitly accepted import_scope and passed it through to import_meta_graph through **saver_kwargs. PiperOrigin-RevId: 200249417
* Allow SavedModelBuilder to use custom Savers, and pass custom Savers includedGravatar Karmel Allison2018-06-06
| | | | | | in Estimator model functions through to the Builder when saving. PiperOrigin-RevId: 199546645
* Merge changes from github.Gravatar Yifei Feng2018-05-24
| | | | | | | Revert #18413. Too many internal test failures due to the name scope change caused by this change. Revert #18192. Cannot use re2::StringPiece internally. Need alternative for set call. Will pull and clean this up in a separate change. PiperOrigin-RevId: 197991247
* Resolve name collisions with assets in SavedModels by deduplicating names thatGravatar Karmel Allison2018-05-23
| | | | | | point to distinct files. PiperOrigin-RevId: 197835288
* Remove _USE_C_API staging in tests now that the C API is enabled by default.Gravatar Skye Wanderman-Milne2018-05-16
| | | | | | This is in preparation for removing the _USE_C_API toggle altogether. PiperOrigin-RevId: 196920481
* Add the ability to export separate SavedModels for train and eval mode to ↵Gravatar Karmel Allison2018-05-05
| | | | | | Estimator with two new methods, available in tf.contrib: export_all_saved_models and export_saved_model_for_mode. PiperOrigin-RevId: 195485922
* Removing remove_undocumented calls from tensorflow/python.Gravatar Anna R2018-04-25
| | | | PiperOrigin-RevId: 194274698
* Remove all_opensource_files. It's not needed any more.Gravatar Martin Wicke2018-03-28
| | | | PiperOrigin-RevId: 190878279
* Make SavedModel builder validation accept signatures involving sparse tensors.Gravatar David Soergel2018-03-05
| | | | PiperOrigin-RevId: 187883080
* Make import_graph_def add default attr values with the C API enabled.Gravatar Skye Wanderman-Milne2018-02-09
| | | | | | | | | It turns out that the original Python code modifies the graph_def argument to add default attr values. I'm not sure if the behavior is covered by our API guarantees since it's not documented, but let's keep the behavior consistent for now. PiperOrigin-RevId: 185193037
* Make SavedModelTest.testStripDefaultAttrsInconsistentConsumerDefaults work ↵Gravatar Skye Wanderman-Milne2018-02-08
| | | | | | | | | | | with C API. The test originally altered the Python version of the op registry, which is not reflected in the C API. This changes the test to alter the serialized node def instead of the op def, and renames the test to testInconsistentConsumerDefaultAttrs. PiperOrigin-RevId: 185067838
* Merge changes from github.Gravatar Michael Case2018-02-07
| | | | PiperOrigin-RevId: 184897758
* Adding tf_export decorators/calls to TensorFlow functions and constants.Gravatar Anna R2018-02-06
| | | | PiperOrigin-RevId: 184708277
* Make with_c_api more robust and enable C API in most of saved_model_test.py.Gravatar Skye Wanderman-Milne2018-01-29
| | | | | | | | | | | | | | This change makes the test_util.with_c_api decorator call reset_default_graph() after enabling or disabling the C API instead of creating a new Graph. This makes it more robust to tests that call reset_default_graph(), which requires that the current default graph isn't nested (which the C API-enabled Graph previously was). In addition, enables the C API with saved_model_test.py (which required the above change). A few tests still need further changes, which I'll post in subsequent patches. PiperOrigin-RevId: 183739148
* Add C0301 line-too-long error to pylint sanity check.Gravatar Yifei Feng2018-01-26
| | | | PiperOrigin-RevId: 183467186
* meta_graph export: Add support to strip default valued attributes.Gravatar A. Unique TensorFlower2018-01-02
| | | | | | | | | | | | | | | | | | Following APIs now accept an additional argument (`strip_default_attrs`) to enable/disable (default:disabled) stripping of default valued attributes in a NodeDef: o meta_graph: export_meta_graph, create_meta_graph. o saver: Saver.save, Saver.export_meta_graph. o builder: SavedModelBuilder.add_meta_graph, SavedModelBuilder.add_meta_graph_and_variables. o estimator: Estimator.export_savedmodel. Related changes: o Pywrap C++ AreAttrValuesEqual to compare two AttrValue instances. This allows for a single/canonical way of comparing AttrValues in C++/Python. o Add a utility method to meta_graph.py to get the node def by name in a graph def. o Update SavedModelBuilder documentation on relevance of strip_default_attrs flag. PiperOrigin-RevId: 180619001
* Migrate SavedModel simple save functionality from contrib toGravatar Sukriti Ramesh2017-12-19
| | | | | | tensorflow/python/saved_model. PiperOrigin-RevId: 179599527
* nit: it's --> itsGravatar A. Unique TensorFlower2017-12-18
| | | | PiperOrigin-RevId: 179309732
* Add tpu saved model tags. No cpu tag is added because cpu is assumed to be ↵Gravatar A. Unique TensorFlower2017-11-21
| | | | | | the implicit device. PiperOrigin-RevId: 176544698
* Usability improvements regarding export signature generation.Gravatar David Soergel2017-10-19
| | | | | | | | * Log report of which signatures are produced and which TF Serving APIs are targeted. * Improve docstrings for signature_def builders, explaining the TF Serving API constraints. * Accept a single Tensor as a prediction output (which will be named 'output'). PiperOrigin-RevId: 172831366
* Avoids adding duplicate legacy_init_op to the saved_model's exported meta graph.Gravatar A. Unique TensorFlower2017-10-04
| | | | | | | | Previously, when the user restores graph from one meta graph generated from saved_model and then re-generates another saved model, the re-generated model will be invalid because it will contain duplicate legacy_init_ops. PiperOrigin-RevId: 171099152
* Add more validation of serving signatures, both at creation and post hoc.Gravatar David Soergel2017-09-28
| | | | PiperOrigin-RevId: 170376578
* Adds tf.contrib.nn.scaled_softplus(x, alpha) = alpha * softplus(x/alpha). ↵Gravatar A. Unique TensorFlower2017-09-28
| | | | | | This can be thought of as a smoothed version of a ReLU. On Imagenet, alpha=0.3 gives 0.6-1% improvement in validation accuracy compared to ReLU, by reducing the generalization gap. PiperOrigin-RevId: 170376244
* Add more validation of serving signatures, both at creation and post hoc.Gravatar David Soergel2017-09-28
| | | | PiperOrigin-RevId: 170376578
* Add signature def utility functions for inspection of input and output types ↵Gravatar A. Unique TensorFlower2017-09-15
| | | | | | and shapes. PiperOrigin-RevId: 168820997
* BUILD cleanup in tensorflow/python/...Gravatar A. Unique TensorFlower2017-08-16
| | | | PiperOrigin-RevId: 165530192
* Simplify saved_model/utils_test by using tf.sparse_placeholder() as a quickGravatar A. Unique TensorFlower2017-08-15
| | | | | | way of getting a SparseTensor of a particular shape. PiperOrigin-RevId: 165322708
* Comment update for main-op in the SavedModel builder APIs.Gravatar Sukriti Ramesh2017-08-09
| | | | PiperOrigin-RevId: 164791375
* Add a tag constant, gpu, to present graph with GPU support.Gravatar A. Unique TensorFlower2017-07-07
| | | | PiperOrigin-RevId: 161242660