Coder Social home page Coder Social logo

llsourcell / how-to-deploy-a-tensorflow-model-in-production Goto Github PK

View Code? Open in Web Editor NEW
280.0 22.0 137.0 8 KB

This is the code for the "How to Deploy a Tensorflow Model in Production" by Siraj Raval on YouTube

Jupyter Notebook 48.91% Python 51.09%

how-to-deploy-a-tensorflow-model-in-production's Introduction

How-to-Deploy-a-Tensorflow-Model-in-Production

This is the code for the "How to Deploy a Tensorflow Model in Production" by Siraj Raval on YouTube

Overview

This is the code for this video on Youtube by Siraj Raval. We're going to use the Tensorflow Serving library to deploy an inception model in production.

Dependencies

All included in the iPython notebook. You just need docker

Usage

Run the notebook by running jupyter notebook in terminal in the main directory. All the instructions are in there.

The 2 attached files -- one is the client and the other is an example of how we train and save an simple MNIST model for Tensorflow Serving.

Credits

Credits go to Google. I've merely created a wrapper to get people started.

how-to-deploy-a-tensorflow-model-in-production's People

Contributors

llsourcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

how-to-deploy-a-tensorflow-model-in-production's Issues

'inception_export' no such file or directory

bazel-bin/tensorflow_serving/example/inception_export --checkpoint_dir=inception-v3 --export_dir=inception_export
bash: ./bazel-bin/tensorflow_serving/example/inception_export: No such file or directory

Failure: bazel build -c opt tensorflow_serving/...

ERROR: /root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/core/kernels/BUILD:3867:1: C++ compilation of rule '@org_tensorflow//tensorflow/core/kernels:training_ops' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 115 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)

ImportError for backports module when setting checkpoint_dir with inception model

When "saving the inception-v3 model as a checkpoint" (bazel-bin/tensorflow_serving/example/inception_export --checkpoint_dir=inception-v3 --export_dir=inception-export), I get an ImportError for the backports module. I tried using pip install backports but seems like the container doesn't have what I need:

Collecting backports Could not find a version that satisfies the requirement backports (from versions:) No matching distribution found for backports

I'm trying to find a solution for this error in OpenStack, but no luck so far. I found out the current version of the Dockerfile.devel is different from the one you used in the video. For example, now the first line reads : FROM ubuntu:16.04, instead of FROM ubuntu:14.04 like is your case. Not sure what else was changed and if that is the reason for my error. Help?

EDIT: pip install backports.weakref did the trick. I'm sorry about this unfortunate post.

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.