Commit Graph

32 Commits

Author SHA1 Message Date
Michael Case
c3b42c815c Automated rollback of commit 20f03388ac
PiperOrigin-RevId: 217636584
2018-10-17 20:49:29 -07:00
Gunhan Gulsoy
20f03388ac Automated rollback of commit 0d054f2085
PiperOrigin-RevId: 216732038
2018-10-11 11:36:55 -07:00
Michael Case
0d054f2085 Have TensorFlow opensource code use tensorflow_estimator module if available.
PiperOrigin-RevId: 216706771
2018-10-11 09:30:12 -07:00
Zhenyu Tan
6509437545 If keras_model_path is google storage url, provide util to download model
remotely.

PiperOrigin-RevId: 215295504
2018-10-01 16:02:01 -07:00
Pavithra Vijay
de2bcdc7ad Add Mirrored distribution strategy support for new metrics with Keras and Estimator
Add support for stateful metrics in model to estimator

PiperOrigin-RevId: 214714322
2018-09-26 20:33:41 -07:00
Katherine Wu
cda5ea80b8 Roll forward of commit 069f808e5c (rolling back rollback cl/210656847).
Fixing reference to _get_export_outputs_for_spec in TFMA (This function was refactored out, so the string has been removed from the list of methods that are copied from core Estimator).

*** Original change description ***

Automated rollback of commit 069f808e5c

PiperOrigin-RevId: 211122893
2018-08-31 12:12:17 -07:00
Katherine Wu
30a6b56176 Automated rollback of commit 069f808e5c
PiperOrigin-RevId: 210656847
2018-08-28 20:53:28 -07:00
Katherine Wu
069f808e5c Export Keras model to SavedModel.
PiperOrigin-RevId: 210648154
2018-08-28 19:04:24 -07:00
Pavithra Vijay
d97e525c1f Switch to using variable._in_graph_mode instead of context.executing_eagerly() in optimizer.variables()
Remove global collection usage from the Keras model to estimator flow.

PiperOrigin-RevId: 209837803
2018-08-22 15:21:16 -07:00
Pavithra Vijay
d432bd4203 Update initialization of variables in Keras.
- Removes the use of global variable collections for initialization. This means that variables created externally (such as input feed variables) will have to be initialized explicitly.

PiperOrigin-RevId: 209692235
2018-08-21 17:53:09 -07:00
Katherine Wu
fbdef63fe5 Move clone and build function out of the estimator/keras library.
PiperOrigin-RevId: 209223543
2018-08-17 16:22:01 -07:00
Mark Daoust
e4371880b1 Remove magic-doc-links from code.
This change contains no code changes. Only doc-strings.

We can't use relative links in code files, so we don't have much choice but to link to tensorflow.org/

The deleted links were to docs that no longer exist.

PiperOrigin-RevId: 209019572
2018-08-16 12:10:03 -07:00
Priya Gupta
77fabbeabb 1. Move distribution strategy context utility methods to a separate file with few dependencies. This allows us to import this in some places without creating circular dependencies as the original file imported many things.
2. Move the stack used in distribution strategy context to the graph. This allows us to use different strategies in different graphs (for e.g. in train and eval).
This fixes  and .

PiperOrigin-RevId: 208680454
2018-08-14 11:31:36 -07:00
Pavithra Vijay
306dc60499 Add support for the new metrics in Keras.
- Add support for stateful metrics, weighted metrics, metric masking in eager mode.
- Updated masking logic for loss and metrics. (similar to weights in cl/207311700)
- Add weighted_metrics to save and load model.
- Add Categorical accuracy metric.
- Migrating 

PiperOrigin-RevId: 208278596
2018-08-10 15:40:37 -07:00
Anjali Sridhar
ddf66a513d Raise an error when users use DistributionStrategy and native Keras optimizers.
PiperOrigin-RevId: 207637285
2018-08-06 17:30:12 -07:00
Allen Lavoie
1bf206bc82 Split checkpoint management utility functions out of saver.py
Pure refactor, in preparation for adding a higher level checkpoint management utility. This utility will also need to work with the Checkpoint proto, and globbing it on to saver.py seems dirty.

PiperOrigin-RevId: 207179646
2018-08-02 15:51:17 -07:00
Zhenyu Tan
ee6d76a4a4 abstract config overwrite logic as public API
PiperOrigin-RevId: 206621941
2018-07-30 12:02:03 -07:00
Allen Lavoie
eabda97225 Dictionary tracking for tf.keras.Model attribute assignment
Does not inherit from dict (and so won't pass isinstance checks). I've written a small tome about why in a comment on the class definition. This seems not to break anyone, but if it does we can add Mapping to the problematic isinstance checks (as I've done for TF's nest util and Session fetching); ideally custom mappings would be supported everywhere dicts are anyway.

PiperOrigin-RevId: 205898305
2018-07-24 15:11:40 -07:00
Zhenyu Tan
0527ba2f44 warm start estimator from keras model during
model to estimator conversion.

PiperOrigin-RevId: 205858208
2018-07-24 11:17:44 -07:00
Zhenyu Tan
f83a382e87 unblock eager execution for model_to_estimator
PiperOrigin-RevId: 203789461
2018-07-09 10:42:33 -07:00
Allen Lavoie
dcaa037571 Auto tracking for Python lists assigned to attributes of Model/Checkpointable
Conceptually lists just get replaced with a list-like wrapper. A shallow copy is maintained for error checking (since appends to it aren't monitored, we can't do restore-on-create for variables unless it's being modified through the wrapper).

There are lots of other details. I gave up on generalizing our isinstance(obj, (list, tuple)) checks and just subclassed list. Behaving like a list means the type should be unhashable, which requires some workarounds when we're collecting objects (object-identity collections, and object-identity versions of weak reference containers).

Adds a decorator for exempting whole methods from automatic dependency tracking so we don't need to track down every last self.inputs = [] statement to avoid polluting dependencies.

There's a TODO for tuples and dictionaries.

PiperOrigin-RevId: 202703271
2018-06-29 14:04:49 -07:00
Zhenyu Tan
04ec99e1b2 quick fix for identation
PiperOrigin-RevId: 201974360
2018-06-25 10:27:17 -07:00
Billy Lamberta
6af6b3b1ea Rename programmers_guide/ directory to guide/.
Update references in source files and docs in tensorflow and related projects.

PiperOrigin-RevId: 201766994
2018-06-22 17:43:06 -07:00
Michael Case
780e7714d1 Internal Change.
PiperOrigin-RevId: 201554374
2018-06-21 11:14:00 -07:00
Akshay Modi
6070ae0e14 Merge changes from github.
PiperOrigin-RevId: 201110240
2018-06-18 21:04:00 -07:00
Akshay Modi
148b4381fd Automated g4 rollback of changelist 201011811
PiperOrigin-RevId: 201033171
2018-06-18 11:55:03 -07:00
Akshay Modi
e80732c989 Merge changes from github.
PiperOrigin-RevId: 201011811
2018-06-18 09:59:59 -07:00
Shanqing Cai
3ef890dea8 Minor clarification to model_to_estimator() doc string
PiperOrigin-RevId: 198044106
2018-05-25 06:59:32 -07:00
Yifei Feng
b59833c3fd Merge changes from github.
Revert . Too many internal test failures due to the name scope change caused by this change.
Revert . Cannot use re2::StringPiece internally. Need alternative for set call. Will pull and clean this up in a separate change.

PiperOrigin-RevId: 197991247
2018-05-24 19:15:01 -07:00
Anjali Sridhar
d01df010c3 Modify model output names to not be unique when in distribution context.
PiperOrigin-RevId: 197791115
2018-05-23 14:39:26 -07:00
Pavithra Vijay
609b2ce3fe Move Keras code out of _impl folder and remove API files.
PiperOrigin-RevId: 197097430
2018-05-17 21:40:10 -07:00
Michael Case
ce7324768e Move model_to_estimator utility into Estimator from Keras.
Working on untangling TF/Estimator deps. We would like to get to a state
where Estimator depends on Keras and not vice versa

PiperOrigin-RevId: 196605024
2018-05-14 19:18:46 -07:00