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

Updates to the efficientnet conversion code. #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamlong
Copy link

@jamlong jamlong commented Apr 9, 2020

Looks like tensorflow/tpu has updated since this package was last updated - the source files downloaded by the conversion script are no longer sufficient. This runs into further problems in that the new tensorflow/tpu HEAD refers to packages that aren't available in tf 1.12/1.13.

I've made the following changes to get things working:

* Updated the downloader to download src files that have been added
  since this package was last updated. Any thoughts on using a 
  git submodule in lieu of manually downloading files here? 
* The new tensorflow/tpu changes appear to require tensorflow 1.14+/2.x
  as they refer to modules that don't appear to exist in tf 1.12/1.13
* Checkpoint paths changed, as well (now in a /ckpts/ subdirectory)
* Updated load_efficientnet.py to be tensorflow 1.x/2.x compatible.
* Added a --noweights_only option to the conversion script, which
  passes through to load_efficientnet to produce .h5 files with both
  configs and weights.
* Added a --parallel_conversion option to the conversion script,
  which runs the conversion jobs as background processes, and then
  sequentially waits on them. The conversion job is largely CPU
  bound, and runs on a single CPU.
* Updated requirements.txt to include keras and tensorflow, as they appear
  to both be necessary (e.g. I'm not using the "keras" version of keras, but it
  fails if it's not present)
* Updated README.md
   * Instructions for installing aria2
   * Updated instructions for running the conversion script.

    * Updated the downloader to download src files that have been added
      since this package was last updated.
    * Updated load_efficientnet.py to be tensorflow 1.x/2.x compatible.
    * tensorflow 1.14+/2.x is now required, as the underlying tensorflow
      model code now references modules that did not exist in
      tf 1.12/1.13
    * Added a --noweights_only option to the conversion script, which
      passes through to load_efficientnet to produce .h5 files with both
      configs and weights.
    * Added a --parallel_conversion option to the conversion script,
      which runs the conversion jobs as background processes, and then
      sequentially waits on them. The conversion job is largely CPU
      bound, and runs on a single CPU.
    * Updated requirements to include keras and tensorflow, as they are
      both required to run the conversion.
    * Updated README.md
      * Instructions for installing aria2
      * Fixed instructions for the script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant