Coder Social home page Coder Social logo

kerasmodels's Introduction

Keras Models

Models differ based on Accuracy and Performance:

Models

Models stored in ~/.keras/models/

Install

Models missing from TensorFlow require installing Keras:
Replace from tensorflow.python.keras... with just from keras...

sudo apt update 
sudo apt install python-dev 
sudo pip install keras

NASnet Error ImportError: No module named nasnet Fix:

sudo pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

Performance

time python predict.py

TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX

Model Performance (c9 approx) Size Example
Inception V3 10s 92M predict.py
InceptionResNetV2 50s 215M irn2.py
NASNetMobile 38s 24M see below
NASNetLarge 5-12m 344M nasnet.py

colab

run nasnet.py
in line 1 & 2 add from tensorflow.python.

Performance excluding model download:
cpu - 88s
gpu - 34s

FloydHub

FloydHub increases performance, compiled to use SSE4.1 SSE4.2 AVX
NASNetLarge example run.sh runs < 1m on FloydHub:

floyd run \
--data efcic/datasets/nasnet-large/2:models \
--data efcic/datasets/keras/1:keras \
--env tensorflow-1.4 \
"bash run.sh

FloydHub NASNetLarge Setup:

  • mount nasnet_large.h5 model
  • mount Keras 2.1.2
  • run tensorflow 1.4
  • copy model & Keras to local
  • install Keras 2.1.2
  • run inference

kerasmodels's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.