Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim internal changes. #6407

Merged
merged 1 commit into from Mar 21, 2019

Conversation

Projects
None yet
3 participants
@pkulzc
Copy link
Contributor

commented Mar 20, 2019

233991726 by Sergio Guadarrama:

Internal change

231925959 by Sergio Guadarrama:

Internal change

231253502 by Sergio Guadarrama:

Internal change

229973546 by Sergio Guadarrama:

Internal change

229870842 by Sergio Guadarrama:

Internal change

PiperOrigin-RevId: 233991726

Merged commit includes the following changes:
233991726  by Sergio Guadarrama:

    Internal change

231925959  by Sergio Guadarrama:

    Internal change

231253502  by Sergio Guadarrama:

    Internal change

229973546  by Sergio Guadarrama:

    Internal change

229870842  by Sergio Guadarrama:

    Internal change

PiperOrigin-RevId: 233991726

@pkulzc pkulzc requested a review from sguada as a code owner Mar 20, 2019

@googlebot googlebot added the cla: yes label Mar 20, 2019

@sguada

sguada approved these changes Mar 20, 2019

@pkulzc pkulzc merged commit 47d6c66 into tensorflow:master Mar 21, 2019

4 checks passed

Lint Python Files Internal CI build successful
Details
Ubuntu Python2 Internal CI build successful
Details
Ubuntu Python3 Internal CI build successful
Details
cla/google All necessary CLAs are signed

Kiku-git added a commit to Kiku-git/models that referenced this pull request Mar 30, 2019

Merged commit includes the following changes: (tensorflow#6407)
233991726  by Sergio Guadarrama:

    Internal change

231925959  by Sergio Guadarrama:

    Internal change

231253502  by Sergio Guadarrama:

    Internal change

229973546  by Sergio Guadarrama:

    Internal change

229870842  by Sergio Guadarrama:

    Internal change

PiperOrigin-RevId: 233991726

Kiku-git added a commit to Kiku-git/models that referenced this pull request Mar 31, 2019

fix (#2)
* Mixed precision support (tensorflow#6309)

* Mixed precision support

* Add TODOs

* speedup caption generator on im2txt (tensorflow#6255)

* replace the usage of python's built in sort with numpy's argsort, which is faster. Also use the given axes to get the most_likely_words instead of calling enumerate and list (it's slower and more memory conssuming)

* correct indentation and redaction on comment for the changes purposes according to cshallue's comment

* Add fp16 to keras benchmarks (tensorflow#6314)

* Add command line option for multi worker collective implementations, disable checkpointing. (tensorflow#6317)

* s/CollectiveAllReduceStrategy/MultiWorkerMirroredStrategy

* More s/contrib.distribute/distribute.experimental

* Collective communication options in MultiWorkerMirroredStrategy.

* Minor fixes

* No checkpointing if multi worker.

* turn off checkpointing

* fix lint

* Adding panoptic evaluation tools and update internal changes. (tensorflow#6320)

* Internal changes

PiperOrigin-RevId: 237183552

* update readme

PiperOrigin-RevId: 237184584

* No checkpointing only if multi worker strategy. (tensorflow#6322)

* Merged commit includes the following changes: (tensorflow#6315)

236813471  by lzc:

    Internal change.

--
236507310  by lzc:

    Fix preprocess.random_resize_method config type issue. The target height and width will be passed as "size" to tf.image.resize_images which only accepts integer.

--
236409989  by Zhichao Lu:

    Config export_to_tpu from function parameter instead of HParams for TPU inference.

--
236403186  by Zhichao Lu:

    Make graph file names optional arguments.

--
236237072  by Zhichao Lu:

    Minor bugfix for keyword args.

--
236209602  by Zhichao Lu:

    Add support for PartitionedVariable to get_variables_available_in_checkpoint.

--
235828658  by Zhichao Lu:

    Automatically stop evaluation jobs when training is finished.

--
235817964  by Zhichao Lu:

    Add an optional process_metrics_fn callback to eval_util, it gets called
    with evaluation results once each evaluation is complete.

--
235788721  by lzc:

    Fix yml file tf runtime version.

--
235262897  by Zhichao Lu:

    Add keypoint support to the random_pad_image preprocessor method.

--
235257380  by Zhichao Lu:

    Support InputDataFields.groundtruth_confidences in retain_groundtruth(), retain_groundtruth_with_positive_classes(), filter_groundtruth_with_crowd_boxes(), filter_groundtruth_with_nan_box_coordinates(), filter_unrecognized_classes().

--
235109188  by Zhichao Lu:

    Fix bug in pad_input_data_to_static_shapes for num_additional_channels > 0; make color-specific data augmentation only touch RGB channels.

--
235045010  by Zhichao Lu:

    Don't slice class_predictions_with_background when add_background_class is false.

--
235026189  by lzc:

    Fix import in g3doc.

--
234863426  by Zhichao Lu:

    Added fixes in exporter to allow writing a checkpoint to a specified temporary directory.

--
234671886  by lzc:

    Internal Change.

--
234630803  by rathodv:

    Internal Change.

--
233985896  by Zhichao Lu:

    Add Neumann optimizer to object detection.

--
233560911  by Zhichao Lu:

    Add NAS-FPN object detection with Resnet and Mobilenet v2.

--
233513536  by Zhichao Lu:

    Export TPU compatible object detection model

--
233495772  by lzc:

    Internal change.

--
233453557  by Zhichao Lu:

    Create Keras-based SSD+MobilenetV1 for object detection.

--
233220074  by lzc:

    Update release notes date.

--
233165761  by Zhichao Lu:

    Support depth_multiplier and min_depth in _SSDResnetV1FpnFeatureExtractor.

--
233160046  by lzc:

    Internal change.

--
232926599  by Zhichao Lu:

    [tf.data] Switching tf.data functions to use `defun`, providing an escape hatch to continue using the legacy `Defun`.

    There are subtle differences between the implementation of `defun` and `Defun` (such as resources handling or control flow) and it is possible that input pipelines that use control flow or resources in their functions might be affected by this change. To migrate majority of existing pipelines to the recommended way of creating functions in TF 2.0 world, while allowing (a small number of) existing pipelines to continue relying on the deprecated behavior, this CL provides an escape hatch.

    If your input pipeline is affected by this CL, it should apply the escape hatch by replacing `foo.map(...)` with `foo.map_with_legacy_function(...)`.

--
232891621  by Zhichao Lu:

    Modify faster_rcnn meta architecture to normalize raw detections.

--
232875817  by Zhichao Lu:

    Make calibration a post-processing step.

    Specifically:
    - Move the calibration config from pipeline.proto --> post_processing.proto
    - Edit post_processing_builder.py to return a calibration function. If no calibration config is provided, it None.
    - Edit SSD and FasterRCNN meta architectures to optionally call the calibration function on detection scores after score conversion and before NMS.

--
232704481  by Zhichao Lu:

    Edit calibration builder to build a function that will be used within a detection model's `postprocess` method, after score conversion and before non-maxima suppression.

    Specific Edits:
    - The returned function now accepts class_predictions_with_background as its argument instead of detection_scores and detection_classes.
    - Class-specific calibration was temporarily removed, as it requires more significant refactoring. Will be added later.

--
232615379  by Zhichao Lu:

    Internal change

--
232483345  by ronnyvotel:

    Making the use of bfloat16 restricted to TPUs.

--
232399572  by Zhichao Lu:

    Edit calibration builder and proto to support class-agnostic calibration.

    Specifically:
    - Edit calibration protos to include path to relevant label map if required for class-specific calibration. Previously, label maps were inferred from other parts of the pipeline proto; this allows all information required by the builder stay within the calibration proto and remove extraneous information from being passed with class-agnostic calibration.
    - Add class-agnostic protos to the calibration config.

    Note that the proto supports sigmoid and linear interpolation parameters, but the builder currently only supports linear interpolation.

--
231613048  by Zhichao Lu:

    Add calibration builder for applying calibration transformations from output of object detection models.

    Specifically:
    - Add calibration proto to support sigmoid and isotonic regression (stepwise function) calibration.
    - Add a builder to support calibration from isotonic regression outputs.

--
231519786  by lzc:

    model_builder test refactor.
    - removed proto text boilerplate in each test case and let them call a create_default_proto function instead.
    - consolidated all separate ssd model creation tests into one.
    - consolidated all separate faster rcnn model creation tests into one.
    - used parameterized test for testing mask rcnn models and use_matmul_crop_and_resize
    - added all failures test.

--
231448169  by Zhichao Lu:

    Return static shape as a constant tensor.

--
231423126  by lzc:

    Add a release note for OID v4 models.

--
231401941  by Zhichao Lu:

    Adding correct labelmap for the models trained on Open Images V4 (*oid_v4
    config suffix).

--
231320357  by Zhichao Lu:

    Add scope to Nearest Neighbor Resize op so that it stays in the same name scope as the original resize ops.

--
231257699  by Zhichao Lu:

    Switch to using preserve_aspect_ratio in tf.image.resize_images rather than using a custom implementation.

--
231247368  by rathodv:

    Internal change.

--
231004874  by lzc:

    Update documentations to use tf 1.12 for object detection API.

--
230999911  by rathodv:

    Use tf.batch_gather instead of ops.batch_gather

--
230999720  by huizhongc:

    Fix weight equalization test in ops_test.

--
230984728  by rathodv:

    Internal update.

--
230929019  by lzc:

    Add an option to replace preprocess operation with placeholder for ssd feature extractor.

--
230845266  by lzc:

    Require tensorflow version 1.12 for object detection API and rename keras_applications to keras_models

--
230392064  by lzc:

    Add RetinaNet 101 checkpoint trained on OID v4 to detection model zoo.

--
230014128  by derekjchow:

    This file was re-located below the tensorflow/lite/g3doc/convert

--
229941449  by lzc:

    Update SSD mobilenet v2 quantized model download path.

--
229843662  by lzc:

    Add an option to use native resize tf op in fpn top-down feature map generation.

--
229636034  by rathodv:

    Add deprecation notice to a few old parameters in train.proto

--
228959078  by derekjchow:

    Remove duplicate elif case in _check_and_convert_legacy_input_config_key

--
228749719  by rathodv:

    Minor refactoring to make exporter's `build_detection_graph` method public.

--
228573828  by rathodv:

    Mofity model.postprocess to return raw detections and raw scores.

    Modify, post-process methods in core/model.py and the meta architectures to export raw detection (without any non-max suppression) and raw multiclass score logits for those detections.

--
228420670  by Zhichao Lu:

    Add shims for custom architectures for object detection models.

--
228241692  by Zhichao Lu:

    Fix the comment on "losses_mask" in "Loss" class.

--
228223810  by Zhichao Lu:

    Support other_heads' predictions in WeightSharedConvolutionalBoxPredictor. Also remove a few unused parameters and fix a couple of comments in convolutional_box_predictor.py.

--
228200588  by Zhichao Lu:

    Add Expected Calibration Error and an evaluator that calculates the metric for object detections.

--
228167740  by lzc:

    Add option to use bounded activations in FPN top-down feature map generation.

--
227767700  by rathodv:

    Internal.

--
226295236  by Zhichao Lu:

    Add Open Image V4 Resnet101-FPN training config to third_party

--
226254842  by Zhichao Lu:

    Fix typo in documentation.

--
225833971  by Zhichao Lu:

    Option to have no resizer in object detection model.

--
225824890  by lzc:

    Fixes p3 compatibility for model_lib.py

--
225760897  by menglong:

    normalizer should be at least 1.

--
225559842  by menglong:

    Add extra logic filtering unrecognized classes.

--
225379421  by lzc:

    Add faster_rcnn_inception_resnet_v2_atrous_oid_v4 config to third_party

--
225368337  by Zhichao Lu:

    Add extra logic filtering unrecognized classes.

--
225341095  by Zhichao Lu:

    Adding Open Images V4 models to OD API model zoo and corresponding configs to the
    configs.

--
225218450  by menglong:

    Add extra logic filtering unrecognized classes.

--
225057591  by Zhichao Lu:

    Internal change.

--
224895417  by rathodv:

    Internal change.

--
224209282  by Zhichao Lu:

    Add two data augmentations to object detection: (1) Self-concat (2) Absolute pads.

--
224073762  by Zhichao Lu:

    Do not create tf.constant until _generate() is actually called in the object detector.

--

PiperOrigin-RevId: 236813471

* Adding LARS to ResNet (tensorflow#6327)

* Adding LARS to ResNet

* Fixes for the LARS patch

* Fixes for the LARS patch

* more fixes

* 1 more fix

* V1 optimizer fix (tensorflow#6350)

* optimizer back to compat.v1

* add doc string to fix lint

* xla to bs=128 for num_gpu=8 (tensorflow#6351)

* xla to bs=128 for num_gpu=8

* remove todo

* Add fp16 to 8 gpu fp16 tests. (tensorflow#6353)

* Fix ncf test for keras (tensorflow#6355)

* Fix ncf test for keras

* add a todo for batch_size and eval_batch_size for ncf keras

* lint fix

* fix typos

* Lint fix

* fix lint

* resolve pr comment

* resolve pr comment

* Add support for TPUEstimator to data processing pipeline and add the … (tensorflow#6330)

* Add support for TPUEstimator to data processing pipeline and add the ability to store epochs in user specified location.

* Add the option to run Keras resnet model on multiple workers. (tensorflow#6368)

* Shard input for distribution strategy. (tensorflow#6349)

* Shard input for distribution strategy.

* Pass in input_context from real input_fn.

* Pass in input_context from real input_fn.

* Make pipeline id base 1 for better readability.

* Add config to enable XLA in TF 2.0 (tensorflow#6406)

* Added thread tuning and tweaked tests to improve Keras model performance (tensorflow#6396)

* Add `input_context` to `input_fn` in cifar10_main. (tensorflow#6414)

* Add `input_context` to `input_fn` in cifar10_main.

* Change sharding log message to be consistent with `dataset.shard` params.

* Lint

* Redirect MorphNet project to the new repo. (tensorflow#6418)

* Merged commit includes the following changes: (tensorflow#6407)

233991726  by Sergio Guadarrama:

    Internal change

231925959  by Sergio Guadarrama:

    Internal change

231253502  by Sergio Guadarrama:

    Internal change

229973546  by Sergio Guadarrama:

    Internal change

229870842  by Sergio Guadarrama:

    Internal change

PiperOrigin-RevId: 233991726

* Fixed improper HNASNet architecture (tensorflow#6419)

* Disable Tensorboard callback by default (tensorflow#6424)

* Add/Modify tests to track Tensorboard overhead and improve performance of accuracy test. (tensorflow#6434)

* Fixed tensorflow#6183; Typo Correction and Pyglet Docs link (tensorflow#6328)

Added missing 's' character in "install". Added link to pyglet documentation.

* change tf.to_int32 to tf.cast (tensorflow#6359)

tf.to_int32 raise deprecated warning.
change tf.to_int32(labels) to tf.cast(labels, tf.int32)

* Move distribution strategy creation before creating any ops, which is (tensorflow#6435)

required by multi-node collective ops in eager mode.

* Python typing: Use 'str', not 'string' (tensorflow#6422)

https://mypy.readthedocs.io/en/latest/cheat_sheet.html

[flake8](http://flake8.pycqa.org) testing of https://github.com/tensorflow/models on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__
```
./official/recommendation/data_pipeline.py:346:41: F821 undefined name 'string'
               epoch_dir=None           # type: string
                                        ^
```

* Add Keras ResNet model tests in legacy graph mode (tensorflow#6444)

* Change function signature (tensorflow#6459)

* from NCF_input import NCFDataset for line 181

The type __NCFDataset__ is used in the type declaration on line 81 but it is never imported.

[flake8](http://flake8.pycqa.org) testing of https://github.com/tensorflow/models on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__
```
./official/recommendation/data_preprocessing.py:180:3: F821 undefined name 'NCFDataset'
  # type: (str, str, dict, typing.Optional[str], bool, typing.Optional[str]) -> (NCFDataset, typing.Callable)
  ^
1    F821 undefined name 'NCFDataset'
1
```
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

* int, int, data_pipeline.BaseDataConstructor

* Add trivial Keras model (tensorflow#6460)

* Add a README for ResNet keras (tensorflow#6293)

* Initial commit

* Fininshed

* bug fix

* bug fix

* bug fix

* Resolve review comments

* Typo fix

* resolve comments

* fix number error

* Resolve comments

* Re-enable checkpoints for multi worker GPU strategies. (tensorflow#6471)

* Added benchmark test and convergence test for the NCF model (tensorflow#6318)

* initial commit

* bug fix

* Move build_stats from common to keras main, because it is only applicable in keras

* remove tailing blank line

* add test for synth data

* add kwargs to init

* add kwargs to function invokation

* correctly pass kwargs

* debug

* debug

* debug

* fix super init

* bug fix

* fix local_flags

* fix import

* bug fix

* fix log_steps flag

* bug fix

* bug fix: add missing return value

* resolve double-defined flags

* lint fix

* move log_steps flag to benchmarK flag

* fix lint

* lint fix

* lint fix

* try flag core default values

* bug fix

* bug fix

* bug fix

* debug

* debug

* remove debug prints

* rename benchmark methods

* flag bug fix for synth benchmark

* Scale up learning rate according to num workers in Estimator imagenet models. (tensorflow#6472)

* Move distribution strategy creation before creating any ops, which is
required by multi-node collective ops in eager mode.

* Scale up learning rate according to num workers in ResNet50 w/
Estimator.

* Scale up LR in cifar.

* Fix a typo.

* Add num_workers to run param as well. Make num_worker optional in
params.

* fix a typo in doc string (tensorflow#6475)

* Update object detection notebook to use image_np_expanded (tensorflow#6345)

* Add trivial model tests for Resnet data input pipeline (tensorflow#6462)

* Add tests for Resnet data input pipeline

* Added trivial model class to isolate data input pipeline tests

* Fix Keras Trivial Model 1 GPU test (tensorflow#6481)

* Optimize data input pipeline

Co-authored-by: Jiri Simsa <jsimsa@google.com>

* Changing default GPU private thread count to 1

wlongxiang added a commit to wlongxiang/models that referenced this pull request Apr 24, 2019

Merged commit includes the following changes: (tensorflow#6407)
233991726  by Sergio Guadarrama:

    Internal change

231925959  by Sergio Guadarrama:

    Internal change

231253502  by Sergio Guadarrama:

    Internal change

229973546  by Sergio Guadarrama:

    Internal change

229870842  by Sergio Guadarrama:

    Internal change

PiperOrigin-RevId: 233991726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.