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

Fix compatibility for model_builder_test.py #1571

Merged
merged 1 commit into from Jun 17, 2017

Conversation

justanhduc
Copy link
Contributor

iteritems -> items

@derekjchow
Copy link
Contributor

Could you do this with six.iteritems instead to preserve python 2 compatibility?

@sguada sguada requested a review from jch1 June 16, 2017 18:54
@nealwu
Copy link
Contributor

nealwu commented Jun 16, 2017

@derekjchow does items() not fully work in Python 2? I have actually merged a few pull requests converting iteritems() to items() before so it would be good to know.

Copy link
Member

@jch1 jch1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

@sguada sguada merged commit 1b2c67a into tensorflow:master Jun 17, 2017
@justanhduc
Copy link
Contributor Author

@derekjchow @nealwu ok I will commit again using six.iteritems.

@nealwu
Copy link
Contributor

nealwu commented Jun 17, 2017

@justanhduc no worries, we talked and decided that .items() is sufficient here.

RubinLiao added a commit to RubinLiao/models that referenced this pull request Jun 17, 2017
* Make ptb_word_lm compatible with the latest TensorFlow source while maintaining backwards compatibility with TF 1.0

* Rewrite to use inspect.getargspec

* Add a message to the README to use TensorFlow 1.0 or later

* Link to tensorflow.org/install

* Make comment in ptb_word_lm compatible with TF 1.0

* Improved the spacing on the comment

* Domain Separation Networks changes.

* Domain Separation Networks changes.

* README.md Updates

* README.md Updates

* README changes.

* README changes.

* README changes.

* README changes.

* README changes.

* README changes.

* DSN infrastructure staging

* Maintain alphabetization and styling

* Seperation -> Separation

* Upgrade to TF 1.0

* Move the README to the main directory

* Fix double-pasted README and add code tags around the terminal commands

* Make the README for textsum a little clearer

* add binary to file reading

* Additional fixes to get download_and_preprocess_flowers working

* fix missing build images script

* Update README.md

I had to figure this one out on my own. Probably belongs in the manual install notes.

* Remove commented-out deps.

* Add back the line that adds to PYTHONPATH

* DSN infrastructure staging

* =Other tensorflow_models changes.

* Domain Separation Networks changes.

* README.md Updates

* README changes.

* README changes.

* Maintain alphabetization and styling

* Seperation -> Separation

* Upgrade to TF 1.0

* Move the README to the main directory

* Fix double-pasted README and add code tags around the terminal commands

* Remove commented-out deps.

* Add back the line that adds to PYTHONPATH

* Further fixes for the domain_adaptation README

* Clarifications for the inception README

* DSN Updates

* Fix provide_batch_fn for semi-supervised case.

* Update dockerfile to allow notebook to run (tensorflow#1308)

This fixes the 'running as root is not recommended' crash

* Fix broken url link

* fix translate relevant import problem when used as lib.

* Revert merge tensorflow#1292

This broke the bazel build of inception/download_and_preprocess_flowers
The way that this script is written doesn't actually allow it to be ran
outside bazel, some refactoring would be needed if you want to run it
standalone.

It should be ran using

```
bazel build inception/download_and_preprocess_flowers

bazel-bin/inception/download_and_preprocess_flowers
"${FLOWERS_DATA_DIR}"
```

* Un-revert build_image_data.py

* Add back folder name improvements (no trailing slash)

* Issue template for models.

* Fix issue template

* Fixes for compatibility with TF 1.0 and python 3.

* commit to enable true fully convolutional application of network

* Fixed model_deploy to correctly assign weights to variables_device (tensorflow#992)

* Fixed model_deploy to correctly assign weights to variables_device

* Adding test for network_fn's arg_scope

* Style fix (double blank line)

* Add WORKSPACE file to models/slim so that imports work properly

* Revert a change to imports which breaks the instructions given in the tutorial

* Improvements for ISSUE_TEMPLATE.md

* Fixes for differential_privacy

* Further updates to ISSUE_TEMPLATE.md

* Move ISSUE_TEMPLATE.md back to .github temporarily for easier diffing

* Move ISSUE_TEMPLATE.md out of .github and make the system information questions bold

* Code organization for the compression models in preparation for a new
subdirectory.

* Fixed link and made it more descriptive

* Fixed links

* DOC: show images in README.md by removing HTML tags

* DOC: show images in next_frame_prediction/README.md

* Move each image to its own line

* Move each image to its own line

* Change iteritems -> items for py3 compatability

* added OSX build instructions

* Add a note rather than repeating the full command

* Add a note about the ABI flag as well

* Removed rmsprop_momentum flag, use --momentum flag

The flag description for the momentum flag states that it is `The
momentum for the MomentumOptimizer and RMSPropOptimizer`, however its
not actually used in the RMSPropOptimizer.  Instead, a separate
`rmsprop_momentum` flag was used.  This deletes that flag for
simplicity.  It was not referenced anywhere else in the repo.

* Fixed link

* Implementation for Cognitive Mapping and Planning paper.

* xrange replaced with range

'xrange' was used in multiple places. In this setting it provided no measurable gain in terms of performance or memory, but broke python3 compatibility. It was replaced with 'range'

* Add adversarial text model

* Add adversarial text to main README

* Convert the paper titles into links in adversarial_text/README.md

* Description for cognitive mapping and planning in README.

* Remove unused function

Variable summaries and the learning rate are added elsewhere in the
code.  A quick search also shows that this function is never called.

* Minor fixes to ISSUE_TEMPLATE.md to match the tensorflow repository

* A script to generate a text file with FSNS URLs.

* inception: Added protocol flag when running distributed (tensorflow#1401)

Default is TensorFlow default of 'grpc' communication protocol.
If TensorFlow was complied with Verbs support 'grpc+verbs' can be
used to accelerate the tensor passing communication.

* Links to ResNetv2 pre-trained weights. (tensorflow#1373)

* Updated slim README.md to include links to ResNetv2 models.

* Change v1 to V1, v2 to V2, and other minor comments.

* Improvements to several READMEs

* DOC: document bash use for resnet

* Fix a typo

* Fix num_residual_units for w28-10

Fix num_residual_units for w28-10

* Update lm_1b_eval.py

Solve Python 3 compatibility:
- replacing xrange to range
- add .decode() after f.read() to get strings instead of bytes when reading text file

* stack outputs instead of concat outputs

* Open source release of adversarial crypto code corresponding
to Abadi & Andersen paper.

* Open source release of Attention OCR - a model for real-world image text extraction.

* Add link to the model from the top README

* Remove --no-preserve=all build_pip_package.py

This commit removes --no-preserve=all from
syntaxnet/dragnn/tools/build_pip_package.py. It was causing issues for
OSX developers, as that option is not available on OSX.

* Updates to adversarial_text model

* Fix Typos

* Distributed swivel (tensorflow#1441)

* Refactor to use distributed TF API; add driver script.

* Add explicit GPU flag so multiple cards can be used.

* Update docs to mention distributed.sh.

* Don't make use of HParams yet, since they're not available in TF1.0

* Remove personal emails. (tensorflow#1446)

Please use the forum for Swivel discussions instead of contacting the authors directly... thank you!

* resnet_v1 segmentation bugs from 7e2435e resolved

* resnet_v2.py segmentation bugs from 7e2435e resolved

* README updates for adversarial_crypto

* use six.moves.range instead of range

* correct the percentage logs in slim_walkthrough.ipynb

* Fixed the spacing

* correct authorship

* Update textsum/batch_reader.py to use six.next()

* set -e on bash scripts (tensorflow#1330)

These scripts should exit immediately if a command exits with a non-zero status.

* Remove erroneous comment from resnet_v2.py

* minor spelling fix

* Import xrange directly from six.moves for lm_1b

* Fix Typo

* Force new instance creation in MultiRNNCell

* attention_ocr# Update checkpoint and instructions.

* Clean up changes for the attention_ocr README

* Update inception_preprocessing.py

Corrected documentation word "cropt" -> "crop"

* Update slim_walkthrough.ipynb

* Convert control_flow_ops.with_dependencies to tf.control_dependencies

* Add tf.identity

* Update protobuf version dependency

Updates protobuf version as previous (3.0.0b2) was no longer compatible and resulted in failing bazel tests during setup process.

* typo fix

* Image compression: initial version of the entropy coder.

* typo: "observed to common words" -> "two" (tensorflow#1495)

Thanks!

* Remove names in TODO.

* Attention OCR: update README.md

* Remove barrier, add tf.identity where appropriate, and make sure tests pass

* Minor changes

* Fix typo

* Entropy coder for images: remove deprecated functions and update README.

* Fix Bazel incantations in docs

Fixes tensorflow/tensorflow#10239

* Fix arxiv links in README of neural_gpu model

As the links was [[link]] the last `]` was included in the url.

* SYNSETS contains the full path and does not need pwd prepended.

Tested on GCE with ubuntu 16.04. Mirrors change 157536266.

* Add executable flag to models so that they can be run from the download_and_preprocess_imagenet.sh script automatically

* Update resnet_model.py

'elipson' should be epsilon

* To pass test, add VariableV2 in _PSDeviceChooser

* Fixed calls to concat and convolution2d

* Add named arguments to tf.concat and use conv2d instead of convolution2d

* Implemented LRN for AlexNet tutorial

A TODO was stated for adding LRN - Pending GPU support.
LRN was implemented by tensorflow/tensorflow@35df3ed

Hyper-parameters taken from http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks

* iput pipeline on CPU. 1700 images/sec to 8000 on GTX 1080

* pydoc update to match method signature

* Fixed typos and redudant with CPU:0

* Fixed typo and multi-gpu processing same batch on each gpu

* Code cleanup

* Rename the image/label batch variables

* Fixed error message for inception/imagenet.

* Fix a small bug of Python3 compatibility in tutorial example /rnn/ptb

* MobileNet V1 commit (tensorflow#1551)

* MobileNet V1 commit

* updates to README

* Update README.md (tensorflow#1552)

* Fix link to make image show up in mobilenet_v1.md (tensorflow#1554)

Use a relative link instead

* Update inception_resnet_v2.py (tensorflow#1555)

- Add inception_resnet_v2_base
- Provide option to use SAME padding for all inception resnet v2
  layers. This is to align feature maps sizes.

* slim Python 3 compatibility: cPickle and str/bytes (tensorflow#1534)

* Fixed the device specification for dequeue (tensorflow#1480)

This patch assigns dequeue node to inputs_device. And nolonger shows
"Ignoring device specification /device:GPU:X for node
'clone_X/fifo_queue_Dequeue'" message.

* Update model_deploy. (tensorflow#1557)

Fix slow down with only 1 GPU

* Fixing the initialization/loading bug. 

The code currently loads the checkpoint and then initializes the variables resulting to random weights. 
Swapping the order fixes the loading checkpoint issue.

* Changes for consistency

* Missed section comments

* Reproduce reported virtual adversarial text results

* Update resnet (tensorflow#1559)

* Add Tensorflow Object Detection API. (tensorflow#1561)

For details see our paper:
"Speed/accuracy trade-offs for modern convolutional object detectors."
Huang J, Rathod V, Sun C, Zhu M, Korattikara A, Fathi A, Fischer I,
Wojna Z, Song Y, Guadarrama S, Murphy K, CVPR 2017
https://arxiv.org/abs/1611.10012

* Clean up documentation. (tensorflow#1563)

* Reduce batchsize from 32->24 for SSD configs.

* Update username and add new line in READMEs.

* Change depth_radius from 5 to 2

* Add object_detection to the main README

* Update cifar10_input.py

* Download model in Jupyter Notebook. (tensorflow#1580)

* Fixed broken link to mscoco.org

Thanks for the good work!

* Remove the erroneous comment from resnet_v2.py again

* URL returns 404

Fix URL

* Use spatial_squeeze=False for ResNet feature extractors. (tensorflow#1586)

Fixes tensorflow#1585

* Change visualizer font and jupyter notebook line thickness (tensorflow#1589)

* Change DEFINE_enum to DEFINE_string and delete unused file. (tensorflow#1590)

* Fix compatibility for model_builder_test.py (tensorflow#1571)

iteritems -> items
@dyy543182718
Copy link

语言不通想交流都困难,唉!

@kaseyriver11
Copy link

@nealwu I believe this issue is also occurring in batcher.py

tensorflow/models/object_detection/core/batcher.py

@nealwu
Copy link
Contributor

nealwu commented Jun 21, 2017

@kaseyriver11 could you send in a pull request for it?

@kaseyriver11
Copy link

@nealwu It looks like they included it in one of the updates yesterday. Thanks =)

@justanhduc justanhduc deleted the patch-1 branch June 27, 2017 01:40
Smellly pushed a commit to Smellly/models that referenced this pull request Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants