tflite-update 748 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. mkdir -p ../third_party
  3. [email protected]:google/flatbuffers.git
  4. if [ -d "../third_party/flatbuffers" ]; then
  5. pushd "../third_party/flatbuffers" > /dev/null
  6. echo "Fetch ${repository}..."
  7. git fetch -p
  8. echo "Reset ${repository}..."
  9. git reset --hard origin/master
  10. popd > /dev/null
  11. else
  12. pushd "../third_party" > /dev/null
  13. echo "Clone ${repository}..."
  14. git clone --recursive ${repository}
  15. popd > /dev/null
  16. fi
  17. pushd "../third_party/flatbuffers" > /dev/null
  18. cmake -G "Unix Makefiles"
  19. make
  20. popd > /dev/null
  21. echo "Generate '../src/tflite.js'"
  22. ../third_party/flatbuffers/flatc --js ../third_party/tensorflow/tensorflow/contrib/lite/schema/schema.fbs
  23. mv ./schema_generated.js ../src/tflite.js